Class DistinctValuesCollector<T,​R>

  • All Implemented Interfaces:
    Collector, LeafCollector

    public class DistinctValuesCollector<T,​R>
    extends SecondPassGroupingCollector<T>
    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.
    • Constructor Detail

      • DistinctValuesCollector

        public DistinctValuesCollector​(GroupSelector<T> groupSelector,
                                       Collection<SearchGroup<T>> groups,
                                       GroupSelector<R> valueSelector)
        Create a DistinctValuesCollector
        Parameters:
        groupSelector - the group selector to determine the top-level groups
        groups - the top-level groups to collect for
        valueSelector - a group selector to determine which values to collect per-group