Class AllGroupsCollector<T>

  • All Implemented Interfaces:
    Collector, LeafCollector
    Direct Known Subclasses:
    FunctionAllGroupsCollector, TermAllGroupsCollector

    public abstract class AllGroupsCollector<T>
    extends SimpleCollector
    A collector that collects all groups that match the query. Only the group value is collected, and the order is undefined. This collector does not determine the most relevant document of a group.

    This is an abstract version. Concrete implementations define what a group actually is and how it is internally collected.

    • Method Detail

      • getGroupCount

        public int getGroupCount()
        Returns the total number of groups for the executed search. This is a convenience method. The following code snippet has the same effect:
        The total number of groups for the executed search
      • getGroups

        public abstract Collection<TgetGroups()
        Returns the group values

        This is an unordered collections of group values. For each group that matched the query there is a BytesRef representing a group value.

        the group values
      • needsScores

        public boolean needsScores()
        Description copied from interface: Collector
        Indicates if document scores are needed by this collector.
        true if scores are needed.