SearchHit hit4 = hits4.getHits()[0];
assertThat("First should be exact match and has score 1", hit4.getScore(), equalTo(2.0f));
assertImageScore(hits4, nameToSearch, 2.0f);
// test search metadata
TermQueryBuilder termQueryBuilder = QueryBuilders.termQuery("img.metadata.exif_ifd0.x_resolution", "72 dots per inch");
SearchResponse searchResponse5 = client().prepareSearch(INDEX_NAME).setTypes(DOC_TYPE_NAME).setQuery(termQueryBuilder).setSize(totalImages).get();
assertNoFailures(searchResponse5);
SearchHits hits5 = searchResponse5.getHits();
assertThat("Should match at least one record", hits5.getTotalHits(), greaterThanOrEqualTo(1l)); // if using hash, total result maybe different than number of images