Class ParentJoinAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.AggregatorBase
org.elasticsearch.search.aggregations.bucket.BucketsAggregator
org.elasticsearch.join.aggregations.ParentJoinAggregator
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.search.Collector,org.elasticsearch.core.Releasable,org.elasticsearch.search.aggregations.bucket.SingleBucketAggregator
- Direct Known Subclasses:
ChildrenToParentAggregator,ParentToChildrenAggregator
public abstract class ParentJoinAggregator
extends org.elasticsearch.search.aggregations.bucket.BucketsAggregator
implements org.elasticsearch.search.aggregations.bucket.SingleBucketAggregator
An aggregator that joins documents based on global ordinals.
Global ordinals that match the main query and the
inFilter query are replayed
with documents matching the outFilter query.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceStrategy for collecting the global ordinals of the join field in for all docs that match theParentJoinAggregator#inFilterand then checking if which of the docs in theParentJoinAggregator#outFilteralso have the ordinal.protected classUses a dense, bit per ordinal representation of the join field in the docs that matchParentJoinAggregator#inFilter.protected classUses a hashed representation of whether of the join field in the docs that matchParentJoinAggregator#inFilter.Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
org.elasticsearch.search.aggregations.bucket.BucketsAggregator.BucketBuilderForFixedCount<B extends Object>, org.elasticsearch.search.aggregations.bucket.BucketsAggregator.BucketBuilderForVariable<B extends Object>, org.elasticsearch.search.aggregations.bucket.BucketsAggregator.ResultBuilderForVariable<B extends Object>, org.elasticsearch.search.aggregations.bucket.BucketsAggregator.SingleBucketResultBuilderNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.Aggregator.BucketComparator, org.elasticsearch.search.aggregations.Aggregator.Parser, org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
docCountProviderFields inherited from class org.elasticsearch.search.aggregations.AggregatorBase
collectableSubAggregators, DEFAULT_WEIGHT, name, parent, subAggregatorsFields inherited from class org.elasticsearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR -
Constructor Summary
ConstructorsConstructorDescriptionParentJoinAggregator(String name, org.elasticsearch.search.aggregations.AggregatorFactories factories, org.elasticsearch.search.aggregations.support.AggregationContext context, org.elasticsearch.search.aggregations.Aggregator parent, org.apache.lucene.search.Query inFilter, org.apache.lucene.search.Query outFilter, org.elasticsearch.search.aggregations.support.ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, org.elasticsearch.search.aggregations.CardinalityUpperBound cardinality, Map<String,Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoClose()org.elasticsearch.search.aggregations.LeafBucketCollectorgetLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, org.elasticsearch.search.aggregations.LeafBucketCollector sub)voidprotected voidprepareSubAggs(long[] ordsToCollect)Methods inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
bucketComparator, bucketDocCount, buildAggregationsForFixedBucketCount, buildAggregationsForSingleBucket, buildAggregationsForVariableBuckets, buildSubAggsForAllBuckets, buildSubAggsForBuckets, buildSubAggsForBuckets, close, collectBucket, collectExistingBucket, descendsFromGlobalAggregator, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, preGetSubLeafCollectors, resolveSortPath, rewriteBucketsMethods inherited from class org.elasticsearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, bigArrays, buildEmptySubAggregations, doPostCollection, doPreCollection, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, preCollection, scoreMode, searcher, subAggregator, subAggregators, topLevelQuery, toStringMethods inherited from class org.elasticsearch.search.aggregations.Aggregator
buildAggregations, buildEmptyAggregation, buildTopLevel, collectDebugInfo, resolveSortPathOnValidAgg
-
Constructor Details
-
ParentJoinAggregator
public ParentJoinAggregator(String name, org.elasticsearch.search.aggregations.AggregatorFactories factories, org.elasticsearch.search.aggregations.support.AggregationContext context, org.elasticsearch.search.aggregations.Aggregator parent, org.apache.lucene.search.Query inFilter, org.apache.lucene.search.Query outFilter, org.elasticsearch.search.aggregations.support.ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, org.elasticsearch.search.aggregations.CardinalityUpperBound cardinality, Map<String,Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
getLeafCollector
public final org.elasticsearch.search.aggregations.LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, org.elasticsearch.search.aggregations.LeafBucketCollector sub) throws IOException- Specified by:
getLeafCollectorin classorg.elasticsearch.search.aggregations.AggregatorBase- Throws:
IOException
-
postCollection
- Overrides:
postCollectionin classorg.elasticsearch.search.aggregations.AggregatorBase- Throws:
IOException
-
prepareSubAggs
- Overrides:
prepareSubAggsin classorg.elasticsearch.search.aggregations.bucket.BucketsAggregator- Throws:
IOException
-
doClose
protected void doClose()- Overrides:
doClosein classorg.elasticsearch.search.aggregations.AggregatorBase
-