org.apache.lucene.search.grouping

## Class DistinctValuesCollector<T>

- java.lang.Object
- - org.apache.lucene.search.SimpleCollector
  - - org.apache.lucene.search.grouping.DistinctValuesCollector<T>

- All Implemented Interfaces:
    Collector, LeafCollector
  Direct Known Subclasses:
    FunctionDistinctValuesCollector, TermDistinctValuesCollector

      public abstract class DistinctValuesCollector<T>
      extends SimpleCollector

  A second pass grouping collector that keeps track of distinct values for a specified field for the top N group.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DistinctValuesCollector.GroupCount<T>` Returned by `getGroups()`, representing the value and set of distinct values for the group.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistinctValuesCollector()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract List<DistinctValuesCollector.GroupCount<T>>` | `getGroups()` Returns all unique values for each top N group.
    `boolean` | `needsScores()`

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

      `collect, doSetNextReader, getLeafCollector, setScorer`

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

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

- - ### Constructor Detail

    - #### DistinctValuesCollector

          public DistinctValuesCollector()

  - ### Method Detail

    - #### getGroups

          public abstract List<DistinctValuesCollector.GroupCount<T>> getGroups()

      Returns all unique values for each top N group.
      Returns:
        all unique values for each top N group

    - #### needsScores

          public boolean needsScores()

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