String value = nextFieldValue();
builder.setQuery(termQuery("field", value));
searchCounter.incrementAndGet();
SearchResponse searchResponse = builder.execute().actionGet();
if (searchResponse.failedShards() > 0) {
logger.warn("failed search " + Arrays.toString(searchResponse.shardFailures()));
}
// verify that all come from the requested index
for (SearchHit hit : searchResponse.hits()) {
if (!hit.shard().index().equals(indexName)) {
logger.warn("got wrong index, asked for [{}], got [{}]", indexName, hit.shard().index());