Class MinAggregator

    • Method Detail

      • shouldCollect

        public boolean shouldCollect()
        Specified by:
        shouldCollect in class  Aggregator
        Returns:
        Whether this aggregator is in the state where it can collect documents. Some aggregators can do their aggregations without actually collecting documents, for example, an aggregator that computes stats over unmapped fields doesn't need to collect anything as it knows to just return "empty" stats as the aggregation result.
      • setNextReader

        public void setNextReader(org.apache.lucene.index.AtomicReaderContext reader)
      • collect

        public void collect(int doc,
                            long owningBucketOrdinal)
                     throws IOException
        Description copied from class: BucketCollector
        Called during the query phase, to collect & aggregate the given document.
        Specified by:
        collect in class  BucketCollector
        owningBucketOrdinal - The ordinal of the bucket this aggregator belongs to, assuming this aggregator is not a top level aggregator. Typically, aggregators with #bucketAggregationMode set to Aggregator.BucketAggregationMode.MULTI_BUCKETS will heavily depend on this ordinal. Other aggregators may or may not use it and can see this ordinal as just an extra information for the aggregation context. For top level aggregators, the ordinal will always be equal to 0.
        Throws:
        IOException -
      • metric

        public double metric(long owningBucketOrd)
      • doClose

        public void doClose()
        Description copied from class: Aggregator
        Release instance-specific data.