Class TermFirstPassGroupingCollector

    • Constructor Detail

      • TermFirstPassGroupingCollector

        public TermFirstPassGroupingCollector​(String groupField,
                                              Sort groupSort,
                                              int topNGroups)
                                       throws IOException
        Create the first pass collector.
        Parameters:
        groupField - The field used to group documents. This field must be single-valued and indexed (FieldCache is used to access its value per-document).
        groupSort - The Sort used to sort the groups. The top sorted document within each group according to groupSort, determines how that group sorts against other groups. This must be non-null, ie, if you want to groupSort by relevance use Sort.RELEVANCE.
        topNGroups - How many top groups to keep.
        Throws:
        IOException - When I/O related errors occur