diff --git a/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollectorManager.java b/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollectorManager.java index 10a8c2d2624a..3165b083074c 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollectorManager.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollectorManager.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.util.Collection; import java.util.List; -import org.apache.lucene.search.Collector; import org.apache.lucene.search.CollectorManager; import org.apache.lucene.search.FieldDoc; import org.apache.lucene.search.IndexSearcher; @@ -80,13 +79,21 @@ public ReducedFacetsCollector(final Collection facetsCollectors } } - /** Utility method, to search and also collect all hits into the provided {@link Collector}. */ + /** + * Utility method, to search and also populate a {@code FacetsCollector} with hits. The provided + * {@code FacetsCollectorManager} will be used for creating/reducing {@code FacetsCollector} + * instances. + */ public static FacetsResult search( IndexSearcher searcher, Query q, int n, FacetsCollectorManager fcm) throws IOException { return doSearch(searcher, null, q, n, null, false, fcm); } - /** Utility method, to search and also collect all hits into the provided {@link Collector}. */ + /** + * Utility method, to search and also populate a {@code FacetsCollector} with hits. The provided + * {@code FacetsCollectorManager} will be used for creating/reducing {@code FacetsCollector} + * instances. + */ public static FacetsResult search( IndexSearcher searcher, Query q, int n, Sort sort, FacetsCollectorManager fcm) throws IOException { @@ -96,7 +103,11 @@ public static FacetsResult search( return doSearch(searcher, null, q, n, sort, false, fcm); } - /** Utility method, to search and also collect all hits into the provided {@link Collector}. */ + /** + * Utility method, to search and also populate a {@code FacetsCollector} with hits. The provided + * {@code FacetsCollectorManager} will be used for creating/reducing {@code FacetsCollector} + * instances. + */ public static FacetsResult search( IndexSearcher searcher, Query q, @@ -111,14 +122,22 @@ public static FacetsResult search( return doSearch(searcher, null, q, n, sort, doDocScores, fcm); } - /** Utility method, to search and also collect all hits into the provided {@link Collector}. */ + /** + * Utility method, to search and also populate a {@code FacetsCollector} with hits. The provided + * {@code FacetsCollectorManager} will be used for creating/reducing {@code FacetsCollector} + * instances. + */ public static FacetsResult searchAfter( IndexSearcher searcher, ScoreDoc after, Query q, int n, FacetsCollectorManager fcm) throws IOException { return doSearch(searcher, after, q, n, null, false, fcm); } - /** Utility method, to search and also collect all hits into the provided {@link Collector}. */ + /** + * Utility method, to search and also populate a {@code FacetsCollector} with hits. The provided + * {@code FacetsCollectorManager} will be used for creating/reducing {@code FacetsCollector} + * instances. + */ public static FacetsResult searchAfter( IndexSearcher searcher, ScoreDoc after, Query q, int n, Sort sort, FacetsCollectorManager fcm) throws IOException { @@ -128,7 +147,11 @@ public static FacetsResult searchAfter( return doSearch(searcher, after, q, n, sort, false, fcm); } - /** Utility method, to search and also collect all hits into the provided {@link Collector}. */ + /** + * Utility method, to search and also populate a {@code FacetsCollector} with hits. The provided + * {@code FacetsCollectorManager} will be used for creating/reducing {@code FacetsCollector} + * instances. + */ public static FacetsResult searchAfter( IndexSearcher searcher, ScoreDoc after,