Search.totalhits breaking change in ES 7: Java rest client 6.7

Before ES 7, search.totalhits was a number. In ES 7, it is an object with a value and relation.
The behavior can be retained by setting track_total_hits=true and rest_total_hits_as_int=true in search request. But how to pass 2 additional parameter using java rest client 6.7? Otherwise, how do we support the call during the upgrade window?

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