org.apache.lucene.search.grouping.function

## Class FunctionDistinctValuesCollector

- java.lang.Object
- - org.apache.lucene.search.SimpleCollector
  - - org.apache.lucene.search.grouping.DistinctValuesCollector<MutableValue>
    - - org.apache.lucene.search.grouping.function.FunctionDistinctValuesCollector

- All Implemented Interfaces:
    Collector, LeafCollector

      public class FunctionDistinctValuesCollector
      extends DistinctValuesCollector<MutableValue>

  Function based implementation of `DistinctValuesCollector`.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.DistinctValuesCollector

      `DistinctValuesCollector.GroupCount<T>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FunctionDistinctValuesCollector(Map<?,?> vsContext, ValueSource groupSource, ValueSource countSource, Collection<SearchGroup<MutableValue>> groups)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collect(int doc)`
    `protected void` | `doSetNextReader(LeafReaderContext context)`
    `List<DistinctValuesCollector.GroupCount<MutableValue>>` | `getGroups()` Returns all unique values for each top N group.

    - ### Methods inherited from class org.apache.lucene.search.grouping.DistinctValuesCollector

      `needsScores`

    - ### Methods inherited from class org.apache.lucene.search.SimpleCollector

      `getLeafCollector, setScorer`

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

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

- - ### Constructor Detail

    - #### FunctionDistinctValuesCollector

          public FunctionDistinctValuesCollector(Map<?,?> vsContext,
                                                 ValueSource groupSource,
                                                 ValueSource countSource,
                                                 Collection<SearchGroup<MutableValue>> groups)

  - ### Method Detail

    - #### getGroups

          public List<DistinctValuesCollector.GroupCount<MutableValue>> getGroups()

      Description copied from class: `DistinctValuesCollector`
      Returns all unique values for each top N group.
      Specified by:
        `getGroups` in class `DistinctValuesCollector<MutableValue>`
      Returns:
        all unique values for each top N group

    - #### collect

          public void collect(int doc)
                       throws IOException

      Specified by:
        `collect` in interface `LeafCollector`
      Specified by:
        `collect` in class `SimpleCollector`
      Throws:
        `IOException`

    - #### doSetNextReader

          protected void doSetNextReader(LeafReaderContext context)
                                  throws IOException

      Overrides:
        `doSetNextReader` in class `SimpleCollector`
      Throws:
        `IOException`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.