Skip to content

Commit

Permalink
Fixup javadoc for new FacetsCollectorManager static search methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Miller committed Sep 6, 2024
1 parent 47c0a6e commit dc47adb
Showing 1 changed file with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -80,13 +79,21 @@ public ReducedFacetsCollector(final Collection<FacetsCollector> 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 {
Expand All @@ -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,
Expand All @@ -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 {
Expand All @@ -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,
Expand Down

0 comments on commit dc47adb

Please sign in to comment.