Class MinAggregator

    • Method Detail

      • needsScores

        public boolean needsScores()
        Description copied from class: AggregatorBase
        Most aggregators don't need scores, make sure to extend this method if your aggregator needs them.
        Specified by:
        needsScores in interface
        needsScores in class AggregatorBase
      • getPointReaderOrNull

        public static java.util.function.Function<byte[],​java.lang.Number> getPointReaderOrNull​(SearchContext context,
                                                                                                      Aggregator parent,
                                                                                                      ValuesSourceConfig<ValuesSource.Numeric> config)
        Returns a converter for point values if early termination is applicable to the context or null otherwise.
        context - The SearchContext of the aggregation.
        parent - The parent aggregator.
        config - The config for the values source metric.
      • findLeafMinValue

        public static java.lang.Number findLeafMinValue​(org.apache.lucene.index.LeafReader reader,
                                                        java.lang.String fieldName,
                                                        java.util.function.Function<byte[],​java.lang.Number> converter)
        Returns the minimum value indexed in the fieldName field or null if the value cannot be inferred from the indexed PointValues.