-
Notifications
You must be signed in to change notification settings - Fork 275
Description
Description
In the RHLC, which this client is meant to replace, you can make a call like:
restHighLevelClient.search(searchRequest, requestOptions);
It is possible to customise requestOptions such that a query param is added to REST requests going to Elasticsearch, e.g.
RequestOptions requestOptions = RequestOptions.DEFAULT.toBuilder()
.addParameter("filter_path", "-hits.hits._source.annotations")
.build();
This feature was added by elastic/elasticsearch#67802 and its respective back ports.
In the new Java client, you make a call like:
esClient.search(searchRequest, MyDocument.class)
I have not been able to find any way to customise the SearchRequest
to set a parameter like filter_path
. Please would you advise me how to do this; and if it's not currently possible, then please treat this as a feature request! It would be unfortunate to be blocked from upgrading to the new Java client, and thereby blocked from upgrading our applications beyond Java 8, simply because the new Java client is less capable than the existing RHLC.