DocValuesStatsCollectorManager (Lucene 10.5.0 misc API)
Description: declaration: package: org.apache.lucene.misc.search, class: DocValuesStatsCollectorManager

Package org.apache.lucene.misc.search

# Class DocValuesStatsCollectorManager<T,S extends DocValuesStats<T>>

java.lang.Object
org.apache.lucene.misc.search.DocValuesStatsCollectorManager<T,S>

Type Parameters:
  `T` - the type of the DocValues field value
  `S` - the type of `DocValuesStats`

All Implemented Interfaces:
  `CollectorManager<DocValuesStatsCollector,S>`

public class DocValuesStatsCollectorManager<T,S extends DocValuesStats<T>> extends Object implements CollectorManager<DocValuesStatsCollector,S>
A `CollectorManager` implementation for `DocValuesStatsCollector`.

Example usage:

     IndexSearcher searcher = ...; // your IndexSearcher
     DocValuesStatsCollectorManager<Long, DocValuesStats.LongDocValuesStats> manager =
         new DocValuesStatsCollectorManager<>(() -> new DocValuesStats.LongDocValuesStats("price"));
     DocValuesStats.LongDocValuesStats stats = searcher.search(new MatchAllDocsQuery(), manager);

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DocValuesStatsCollectorManager(Supplier<S> statsSupplier)`
  Creates a new DocValuesStatsCollectorManager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DocValuesStatsCollector`
  `newCollector()`
  `S`
  `reduce(Collection<DocValuesStatsCollector> collectors)`

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

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

- ## Constructor Details

  - ### DocValuesStatsCollectorManager

    public DocValuesStatsCollectorManager(Supplier<S> statsSupplier)
    Creates a new DocValuesStatsCollectorManager.
    Parameters:
      `statsSupplier` - a supplier that creates new stats instances for each collector

- ## Method Details

  - ### newCollector

    public DocValuesStatsCollector newCollector() throws IOException
    Specified by:
      `newCollector` in interface `CollectorManager<T,S extends DocValuesStats<T>>`
    Throws:
      `IOException`

  - ### reduce

    public S reduce(Collection<DocValuesStatsCollector> collectors) throws IOException
    Specified by:
      `reduce` in interface `CollectorManager<T,S extends DocValuesStats<T>>`
    Throws:
      `IOException`