@Test
public void testQueryBuilder() throws Exception {
Settings sets = settings.copy();
sets.setProperty(ConfigurationOptions.ES_QUERY, "?q=me*");
QueryBuilder qb = QueryBuilder.query(sets);
Field mapping = client.getMapping();
ScrollReader reader = new ScrollReader(new JdkValueReader(), mapping, true, "_metadata");
int count = 0;
for (ScrollQuery query = qb.build(client, reader); query.hasNext();) {
Object[] next = query.next();
assertNotNull(next);
count++;
}