Hi,
I'm unable to make use of track_total_hits flag when using Java RestHighLevelClient. I was checking Elastic code a bit and it looks like the RequestConverters#addSearchRequestParams
method is adding only certain params from SearchRequest object. I confirmed this is indeed the case with ES v7.13.0 and v6.7.0 (calling RequestConverters.search(r, "_search")
via debugger)
v7.13.0
v6.7.0
The call to RequestConverters.search(searchRequest, "_search").getParameters();
shows track_total_hits isn't part of parameters, even though trackTotalHits is true/intValue.
Please confirm if this could be a bug or there's some other way to setTrackTotalHits when using RestHighLevelClient. Thanks