Class ParentToChildrenAggregator

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.lucene.search.Collector, org.elasticsearch.common.lease.Releasable, org.elasticsearch.search.aggregations.bucket.SingleBucketAggregator

    public class ParentToChildrenAggregator
    extends org.elasticsearch.search.aggregations.bucket.BucketsAggregator
    implements org.elasticsearch.search.aggregations.bucket.SingleBucketAggregator
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator

        org.elasticsearch.search.aggregations.Aggregator.Parser, org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode
    • Field Summary

      • Fields inherited from class org.elasticsearch.search.aggregations.AggregatorBase

        collectableSubAggregators, context, DEFAULT_WEIGHT, name, parent, subAggregators
      • Fields inherited from class org.elasticsearch.search.aggregations.BucketCollector

        NO_OP_COLLECTOR
    • Constructor Summary

      Constructors 
      Constructor Description
      ParentToChildrenAggregator​(java.lang.String name, org.elasticsearch.search.aggregations.AggregatorFactories factories, org.elasticsearch.search.internal.SearchContext context, org.elasticsearch.search.aggregations.Aggregator parent, org.apache.lucene.search.Query childFilter, org.apache.lucene.search.Query parentFilter, org.elasticsearch.search.aggregations.support.ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, java.util.List<org.elasticsearch.search.aggregations.pipeline.PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.elasticsearch.search.aggregations.InternalAggregation buildAggregation​(long owningBucketOrdinal)  
      org.elasticsearch.search.aggregations.InternalAggregation buildEmptyAggregation()  
      protected void doClose()  
      protected void doPostCollection()  
      org.elasticsearch.search.aggregations.LeafBucketCollector getLeafCollector​(org.apache.lucene.index.LeafReaderContext ctx, org.elasticsearch.search.aggregations.LeafBucketCollector sub)  
      • Methods inherited from class org.elasticsearch.search.aggregations.Aggregator

        descendsFromBucketAggregator
      • Methods inherited from class org.elasticsearch.search.aggregations.AggregatorBase

        addRequestCircuitBreakerBytes, buildEmptySubAggregations, context, doPreCollection, getLeafCollector, metaData, name, needsScores, parent, pipelineAggregators, postCollection, preCollection, preGetSubLeafCollectors, subAggregator, subAggregators, toString
      • Methods inherited from class org.elasticsearch.search.aggregations.BucketCollector

        wrap
      • Methods inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator

        bucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectExistingBucket, consumeBucketsAndMaybeBreak, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.elasticsearch.search.aggregations.bucket.SingleBucketAggregator

        bucketDocCount
    • Constructor Detail

      • ParentToChildrenAggregator

        public ParentToChildrenAggregator​(java.lang.String name,
                                          org.elasticsearch.search.aggregations.AggregatorFactories factories,
                                          org.elasticsearch.search.internal.SearchContext context,
                                          org.elasticsearch.search.aggregations.Aggregator parent,
                                          org.apache.lucene.search.Query childFilter,
                                          org.apache.lucene.search.Query parentFilter,
                                          org.elasticsearch.search.aggregations.support.ValuesSource.Bytes.WithOrdinals valuesSource,
                                          long maxOrd,
                                          java.util.List<org.elasticsearch.search.aggregations.pipeline.PipelineAggregator> pipelineAggregators,
                                          java.util.Map<java.lang.String,java.lang.Object> metaData)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • buildAggregation

        public org.elasticsearch.search.aggregations.InternalAggregation buildAggregation​(long owningBucketOrdinal)
                                                                                   throws java.io.IOException
        Specified by:
        buildAggregation in class org.elasticsearch.search.aggregations.Aggregator
        Throws:
        java.io.IOException
      • buildEmptyAggregation

        public org.elasticsearch.search.aggregations.InternalAggregation buildEmptyAggregation()
        Specified by:
        buildEmptyAggregation in class org.elasticsearch.search.aggregations.Aggregator
      • getLeafCollector

        public org.elasticsearch.search.aggregations.LeafBucketCollector getLeafCollector​(org.apache.lucene.index.LeafReaderContext ctx,
                                                                                          org.elasticsearch.search.aggregations.LeafBucketCollector sub)
                                                                                   throws java.io.IOException
        Specified by:
        getLeafCollector in class org.elasticsearch.search.aggregations.AggregatorBase
        Throws:
        java.io.IOException
      • doPostCollection

        protected void doPostCollection()
                                 throws java.io.IOException
        Overrides:
        doPostCollection in class org.elasticsearch.search.aggregations.AggregatorBase
        Throws:
        java.io.IOException
      • doClose

        protected void doClose()
        Overrides:
        doClose in class org.elasticsearch.search.aggregations.AggregatorBase