Class TopGroupsCollector<T>

    • Constructor Detail

      • TopGroupsCollector

        public TopGroupsCollector​(GroupSelector<T> groupSelector,
                                  Collection<SearchGroup<T>> groups,
                                  Sort groupSort,
                                  Sort withinGroupSort,
                                  int maxDocsPerGroup,
                                  boolean getMaxScores)
        Create a new TopGroupsCollector
        Parameters:
        groupSelector - the group selector used to define groups
        groups - the groups to collect TopDocs for
        groupSort - the order in which groups are returned
        withinGroupSort - the order in which documents are sorted in each group
        maxDocsPerGroup - the maximum number of docs to collect for each group
        getMaxScores - if true, record the maximum score for each group
    • Method Detail

      • getTopGroups

        public TopGroups<T> getTopGroups​(int withinGroupOffset)
        Get the TopGroups recorded by this collector
        Parameters:
        withinGroupOffset - the offset within each group to start collecting documents