org.apache.lucene.search.grouping.term

Class TermAllGroupHeadsCollector

    • Method Detail

      • create

        public static AllGroupHeadsCollector<BytesRefcreate(String groupField,
                                                              Sort sortWithinGroup)
        Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments. This factory method decides with implementation is best suited. Delegates to create(String, org.apache.lucene.search.Sort, int) with an initialSize of 128.
        Parameters:
        groupField - The field to group by
        sortWithinGroup - The sort within each group
        Returns:
        an AbstractAllGroupHeadsCollector instance based on the supplied arguments
      • create

        public static AllGroupHeadsCollector<BytesRefcreate(String groupField,
                                                              Sort sortWithinGroup,
                                                              int initialSize)
        Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments. This factory method decides with implementation is best suited.
        Parameters:
        groupField - The field to group by
        sortWithinGroup - The sort within each group
        initialSize - The initial allocation size of the internal int set and group list which should roughly match the total number of expected unique groups. Be aware that the heap usage is 4 bytes * initialSize.
        Returns:
        an AbstractAllGroupHeadsCollector instance based on the supplied arguments