Class TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>

    • Constructor Detail

      • TermAllGroupHeadsCollector

        protected TermAllGroupHeadsCollector​(String groupField,
                                             int numberOfSorts)
    • Method Detail

      • create

        public static AbstractAllGroupHeadsCollector create​(String groupField,
                                                            Sort sortWithinGroup)
                                                     throws IOException
        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
        Throws:
        IOException - If I/O related errors occur
      • create

        public static AbstractAllGroupHeadsCollector create​(String groupField,
                                                            Sort sortWithinGroup,
                                                            int initialSize)
                                                     throws IOException
        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
        Throws:
        IOException - If I/O related errors occur