FacetsCollectorManager (Lucene 10.5.0 facet API)
Description: declaration: package: org.apache.lucene.facet, class: FacetsCollectorManager

Package org.apache.lucene.facet

# Class FacetsCollectorManager

java.lang.Object
org.apache.lucene.facet.FacetsCollectorManager

All Implemented Interfaces:
  `CollectorManager<FacetsCollector,FacetsCollector>`

public class FacetsCollectorManager extends Object implements CollectorManager<FacetsCollector,FacetsCollector>
A `CollectorManager` implementation which produces FacetsCollector and produces a merged FacetsCollector. This is used for concurrent FacetsCollection.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final record`
  `FacetsCollectorManager.FacetsResult`
  Holds results of a search run via static utility methods exposed by this class.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FacetsCollectorManager()`
  Sole constructor.
  `FacetsCollectorManager(boolean keepScores)`
  Creates a new collector manager that in turn creates `FacetsCollector` using the provided `keepScores` flag.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FacetsCollector`
  `newCollector()`
  `FacetsCollector`
  `reduce(Collection<FacetsCollector> collectors)`
  `static FacetsCollectorManager.FacetsResult`
  `search(IndexSearcher searcher, Query q, int n, FacetsCollectorManager fcm)`
  Utility method, to search and also populate a `FacetsCollector` with hits.
  `static FacetsCollectorManager.FacetsResult`
  `search(IndexSearcher searcher, Query q, int n, Sort sort, boolean doDocScores, FacetsCollectorManager fcm)`
  Utility method, to search and also populate a `FacetsCollector` with hits.
  `static FacetsCollectorManager.FacetsResult`
  `search(IndexSearcher searcher, Query q, int n, Sort sort, FacetsCollectorManager fcm)`
  Utility method, to search and also populate a `FacetsCollector` with hits.
  `static FacetsCollectorManager.FacetsResult`
  `searchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, FacetsCollectorManager fcm)`
  Utility method, to search and also populate a `FacetsCollector` with hits.
  `static FacetsCollectorManager.FacetsResult`
  `searchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, Sort sort, boolean doDocScores, FacetsCollectorManager fcm)`
  Utility method, to search and also populate a `FacetsCollector` with hits.
  `static FacetsCollectorManager.FacetsResult`
  `searchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, Sort sort, FacetsCollectorManager fcm)`
  Utility method, to search and also populate a `FacetsCollector` with hits.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FacetsCollectorManager

    public FacetsCollectorManager()
    Sole constructor.

  - ### FacetsCollectorManager

    public FacetsCollectorManager(boolean keepScores)
    Creates a new collector manager that in turn creates `FacetsCollector` using the provided `keepScores` flag. hits.

- ## Method Details

  - ### newCollector

    public FacetsCollector newCollector() throws IOException
    Specified by:
      `newCollector` in interface `CollectorManager<FacetsCollector,FacetsCollector>`
    Throws:
      `IOException`

  - ### reduce

    public FacetsCollector reduce(Collection<FacetsCollector> collectors) throws IOException
    Specified by:
      `reduce` in interface `CollectorManager<FacetsCollector,FacetsCollector>`
    Throws:
      `IOException`

  - ### search

    public static FacetsCollectorManager.FacetsResult search(IndexSearcher searcher, Query q, int n, FacetsCollectorManager fcm) throws IOException
    Utility method, to search and also populate a `FacetsCollector` with hits. The provided `FacetsCollectorManager` will be used for creating/reducing `FacetsCollector` instances.
    Throws:
      `IOException`

  - ### search

    public static FacetsCollectorManager.FacetsResult search(IndexSearcher searcher, Query q, int n, Sort sort, FacetsCollectorManager fcm) throws IOException
    Utility method, to search and also populate a `FacetsCollector` with hits. The provided `FacetsCollectorManager` will be used for creating/reducing `FacetsCollector` instances.
    Throws:
      `IOException`

  - ### search

    public static FacetsCollectorManager.FacetsResult search(IndexSearcher searcher, Query q, int n, Sort sort, boolean doDocScores, FacetsCollectorManager fcm) throws IOException
    Utility method, to search and also populate a `FacetsCollector` with hits. The provided `FacetsCollectorManager` will be used for creating/reducing `FacetsCollector` instances.
    Throws:
      `IOException`

  - ### searchAfter

    public static FacetsCollectorManager.FacetsResult searchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, FacetsCollectorManager fcm) throws IOException
    Utility method, to search and also populate a `FacetsCollector` with hits. The provided `FacetsCollectorManager` will be used for creating/reducing `FacetsCollector` instances.
    Throws:
      `IOException`

  - ### searchAfter

    public static FacetsCollectorManager.FacetsResult searchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, Sort sort, FacetsCollectorManager fcm) throws IOException
    Utility method, to search and also populate a `FacetsCollector` with hits. The provided `FacetsCollectorManager` will be used for creating/reducing `FacetsCollector` instances.
    Throws:
      `IOException`

  - ### searchAfter

    public static FacetsCollectorManager.FacetsResult searchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, Sort sort, boolean doDocScores, FacetsCollectorManager fcm) throws IOException
    Utility method, to search and also populate a `FacetsCollector` with hits. The provided `FacetsCollectorManager` will be used for creating/reducing `FacetsCollector` instances.
    Throws:
      `IOException`