javanna commented on code in PR #13733:
URL: https://github.com/apache/lucene/pull/13733#discussion_r1747548475


##########
lucene/facet/src/java/org/apache/lucene/facet/FacetsCollectorManager.java:
##########
@@ -54,4 +79,138 @@ public ReducedFacetsCollector(final 
Collection<FacetsCollector> facetsCollectors
           facetsCollector -> 
matchingDocs.addAll(facetsCollector.getMatchingDocs()));
     }
   }
+
+  /** Utility method, to search and also collect all hits into the provided 
{@link Collector}. */
+  public static FacetsResult search(
+      IndexSearcher searcher, Query q, int n, FacetsCollectorManager fcm) 
throws IOException {

Review Comment:
   Yes! I was going to make the same comment. I was going to ask if we need to 
care for scenarios where the manager is a subclass of `FacetsCollectorManager`. 
But the `keepScores` flag made it kind of necessary to accept the collector 
manager, unless we want to accept the flag instead which is a little cryptic?



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