We are using ES version 2.1.1 and below code not returning the latest document created. Please suggest and let me know if the DFS_QUERY_THEN_FETCH is good idea to use in prod ?
we lookup the given input in ES by using below code and then updates some of the other attributes associated to that found document in ES
Example : this code returns Dave Deleted but expecting Dave Created document since Created document is the latest entry in ES.
Name | Status
final SearchRequestBuilder srb = es.getClient().prepareSearch(es.getStatsIndex()).setTypes("voiceProductSnapshot")
final BoolQueryBuilder qb = QueryBuilders.boolQuery();
final SearchResponse response = srb.setQuery(qb).execute().actionGet();