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