jainankitk commented on code in PR #14439:
URL: https://github.com/apache/lucene/pull/14439#discussion_r2054894167


##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/facet/plain/histograms/HistogramCollector.java:
##########
@@ -53,11 +65,30 @@ public LeafCollector getLeafCollector(LeafReaderContext 
context) throws IOExcept
       // The segment has no values, nothing to do.
       throw new CollectionTerminatedException();
     }
+
+    // We can use multi range traversal logic to collect the histogram on 
numeric
+    // field indexed as point for MATCH_ALL cases. In future, this can be 
extended
+    // for Point Range Query cases as well
+    if (query instanceof MatchAllDocsQuery && context.reader().hasDeletions() 
== false) {

Review Comment:
   Yes we can, but I am anyway planning to address `PointRangeQuery` case more 
generically as fast followup - https://github.com/apache/lucene/issues/14535. 
Also with intra-segment search, `leafCollector` can be called multiple times, 
so I want to ensure that in cases we don't use this optimization has minimal 
overhead. I am assuming `weight.count(context)` will have some overhead?



-- 
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