stefanvodita commented on code in PR #1001:
URL: https://github.com/apache/lucene/pull/1001#discussion_r911942109


##########
lucene/facet/src/java/org/apache/lucene/facet/facetset/MatchingFacetSetsCounts.java:
##########
@@ -76,8 +92,12 @@ private int count(String field, 
List<FacetsCollector.MatchingDocs> matchingDocs)
 
       BinaryDocValues binaryDocValues = 
DocValues.getBinary(hits.context.reader(), field);
 
-      final DocIdSetIterator it =
-          
ConjunctionUtils.intersectIterators(Arrays.asList(hits.bits.iterator(), 
binaryDocValues));
+      DocIdSetIterator it = createIterator(hits);

Review Comment:
   This is a bit of code that I’m not too happy about. In `createIterator()`, 
we are  intersecting 2 iterators and then we intersect the resulting iterator 
again. Instead, we could intersect all 3 iterators at once, but that doesn’t 
work well with the `FacetCountsWithFilterQuery` abstraction.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to