Class GroupFacetCollector

    • Field Detail

      • groupField

        protected final java.lang.String groupField
      • facetField

        protected final java.lang.String facetField
      • facetPrefix

        protected final BytesRef facetPrefix
      • segmentFacetCounts

        protected int[] segmentFacetCounts
      • segmentTotalCount

        protected int segmentTotalCount
      • startFacetOrd

        protected int startFacetOrd
      • endFacetOrd

        protected int endFacetOrd
    • Constructor Detail

      • GroupFacetCollector

        protected GroupFacetCollector​(java.lang.String groupField,
                                      java.lang.String facetField,
                                      BytesRef facetPrefix)
    • Method Detail

      • mergeSegmentResults

        public GroupFacetCollector.GroupedFacetResult mergeSegmentResults​(int size,
                                                                          int minCount,
                                                                          boolean orderByCount)
                                                                   throws java.io.IOException
        Returns grouped facet results that were computed over zero or more segments. Grouped facet counts are merged from zero or more segment results.
        Parameters:
        size - The total number of facets to include. This is typically offset + limit
        minCount - The minimum count a facet entry should have to be included in the grouped facet result
        orderByCount - Whether to sort the facet entries by facet entry count. If false then the facets are sorted lexicographically in ascending order.
        Returns:
        grouped facet results
        Throws:
        java.io.IOException - If I/O related errors occur during merging segment grouped facet counts.
      • scoreMode

        public ScoreMode scoreMode()
        Description copied from interface: Collector
        Indicates what features are required from the scorer.