setTrackTotalHits (Java transport client) default in docs is wrong

Hi,
according to the docs:
"Indicates if the total hit count for the query should be tracked. Defaults to true".

When I use client.prepareSearch(...) and don't set setTrackTotalHits I still get the result with "gte" totals. Setting setTrackTotalHits to true solves the issue.

Either the default is false, or am I doing something wrong?

Thanks,
Eli

Could you share the link to the documentation and the version you are using?

The javadoc. I am using 7.0.0 but it's also in master. see:

Hmmm. Looks like a Javadoc issue. @jimczi WDYT?

Thanks @dadoonet and @e-orz this is a leftover. I opened https://github.com/elastic/elasticsearch/pull/42219 to fix the docs.

1 Like

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