goankur commented on a change in pull request #282:
URL: https://github.com/apache/lucene/pull/282#discussion_r706535145



##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/sortedset/ConcurrentSortedSetDocValuesFacetCounts.java
##########
@@ -207,11 +210,17 @@ public Void call() throws IOException {
           // Remap every ord to global ord as we iterate:
           if (singleValues != null) {
             for (int doc = it.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; 
doc = it.nextDoc()) {
+              if (liveDocs != null && liveDocs.get(doc) == false) {

Review comment:
       Checking `liveDocs`  only when `hits` is `null` makes sense to me.  
However, duplicating significant amount of code doesn't sound appealing to me. 
To get around this issue,  I created a new DocIdSetIterator that wraps liveDocs 
and the main DocIdSetIterator only when we know we are counting all docs (i.e 
hits is null).  Please see the new PR
   https://github.com/apache/lucene/pull/293/files




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