"If the total number of hits that match the query is greater than the value set in track_total_hits , the total hits in the response will indicate that the returned value is a lower bound:"
"gte" - means "greater than or equal to", why you are using this expression, instead of "gt" - "greater than". greater than the value - means cannot be equal
Could you please clarify the logic of this abbreviation.
Best regards, Andrey
The documentation is misleading, I agree. It should say "If the total number of hits that match the query is greater or equals than the value... Can you open an issue ?
we should never return a value that is greater than the provided track_total_hits so if you set 10000 you can only have values that range between 0 and 10000. The relation will be eq for results between 0 and 9999 and 10000 will set the relation to gte so I think we're good ?
Why it cannot be just "greater than" starting when the value is more than 10000
If its 10000 and less, will be "equal"
Because that's the limit where we stop counting, when we reach 10000 documents in your case. So we don't know if there are more documents or not, the only thing we know is that we collected 10000 documents so the value total number can be equals or greater than this value.
Ah sorry I forgot that we have a special handling in Elasticsearch that differs from Lucene. We count accurately up to 10,000 and return gte for values that are greater so you're right. I also agree that it can be confusing so can you open an issue in Lucene. I am on vacations now but will take a look when I come back or someone else from the team will pick that up. Thanks for catching this @Andrey_Masunov!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.