jainankitk opened a new pull request, #14625:
URL: https://github.com/apache/lucene/pull/14625

   ### Description
   When lowerPoint is equal to upperPoint. In fact, there is no need to compare 
lowerPoint and upperPoint at the same time. The number of comparisons can be 
reduced by half when collecting document ids to construct bitsets and deeply 
traversing the bkd tree.
   During my reading of Elasticsearch related code, I found that when executing 
term or terms queries on the date field, the query is rewritten, and a single 
term is rewritten as a rang query (lowerTerm is the same as upperTerm). The 
terms query uses BooleanQuery to encapsulate multiple range queries. Therefore, 
it is more suitable for this scenario, reducing the number of comparisons and 
improving performance when collecting a large number of documents.
   
   Related #14267
   <!--
   If this is your first contribution to Lucene, please make sure you have 
reviewed the contribution guide.
   https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to