org.apache.lucene.search.grouping.function

## Class FunctionDistinctValuesCollector

- java.lang.Object
- - org.apache.lucene.search.Collector
  - - org.apache.lucene.search.grouping.AbstractDistinctValuesCollector<FunctionDistinctValuesCollector.GroupCount>
    - - org.apache.lucene.search.grouping.function.FunctionDistinctValuesCollector

-     public class FunctionDistinctValuesCollector
      extends AbstractDistinctValuesCollector<FunctionDistinctValuesCollector.GroupCount>

  Function based implementation of `AbstractDistinctValuesCollector`.
  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` | `FunctionDistinctValuesCollector.GroupCount` Holds distinct values for a single group.

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collect(int doc)`
    `List<FunctionDistinctValuesCollector.GroupCount>` | `getGroups()` Returns all unique values for each top N group.
    `void` | `setNextReader(AtomicReaderContext context)`

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

      `acceptsDocsOutOfOrder, 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<FunctionDistinctValuesCollector.GroupCount> getGroups()

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

    - #### collect

          public void collect(int doc)
                       throws IOException

      Specified by:
        `collect` in class `Collector`
      Throws:
        `IOException`

    - #### setNextReader

          public void setNextReader(AtomicReaderContext context)
                             throws IOException

      Specified by:
        `setNextReader` in class `Collector`
      Throws:
        `IOException`

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