addField(java.lang.String) deprecated in ES v5.6.2

I am upgrading the java api's in favour of es v5.6.2. The code earlier used addField method on SearchRequestBuilder, by passing the field that were to be returned in the method argument. Now, this method been deprecated, so I replaced it with addStoredField. This approach didn't seems to work as the SearchResponse does not have these fields, when calling execute().actionGet() on SearchRequestBuilder .
In the query, the "fields"(es v2.3.3) has changed to "stored_fields"(es v5.6.2) due to addField() being replaced by addStoredField().
However, I haven't set the "store" field as true in the mapping which is being used in the Re-indexing utility, as I can't figure out which way can this issue be resolved.
Please help :worried:

It means that you need to use source filtering then. See

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.