I have following java code :
BoolFilterBuilder boolFilter = getBoolFilterBuilder(opportunityIds, startDate, endDate);
SearchRequestBuilder searchRequestBuilder = this.getTransportClient().prepareSearch(getIndex())
.setTypes(getDocumentType())
.setQuery(QueryBuilders.filteredQuery(QueryBuilders.matchAllQuery(), boolFilter))
.setSearchType(SearchType.SCAN)
.setScroll(new TimeValue(6000))
.setSize(1000);
SearchResponse response = esQueryUtils.execute(searchRequestBuilder);
and the response is
{
"_scroll_id" : "c2Nhbjs1OzQ3MjczMzE6TXp6UG9TUTJUNk8zYWVjZmhtaVVRUTs0NzI3MzMyOk16elBvU1EyVDZPM2FlY2ZobWlVUVE7NDcyNzMzMzpNenpQb1NRMlQ2TzNhZWNmaG1pVVFROzQ3MjczMzQ6TXp6UG9TUTJUNk8zYWVjZmhtaVVRUTs0NzI3MzM1Ok16elBvU1EyVDZPM2FlY2ZobWlVUVE7MTt0b3RhbF9oaXRzOjE2ODk1Ow==",
"took" : 23,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 16895,
"max_score" : 0.0,
"hits" : [ ]
}
}
the problem is why hits is coming empty, if it has a total of 16895.