Package org.opensearch.join.aggregations
Class ParentJoinAggregator
java.lang.Object
org.opensearch.search.aggregations.BucketCollector
org.opensearch.search.aggregations.Aggregator
org.opensearch.search.aggregations.AggregatorBase
org.opensearch.search.aggregations.bucket.BucketsAggregator
org.opensearch.join.aggregations.ParentJoinAggregator
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.search.Collector,Releasable,SingleBucketAggregator
- Direct Known Subclasses:
ChildrenToParentAggregator,ParentToChildrenAggregator
public abstract class ParentJoinAggregator
extends BucketsAggregator
implements 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.opensearch.search.aggregations.bucket.BucketsAggregator
BucketsAggregator.BucketBuilderForFixedCount<B extends Object>, BucketsAggregator.BucketBuilderForVariable<B extends Object>, BucketsAggregator.ResultBuilderForVariable<B extends Object>, BucketsAggregator.SingleBucketResultBuilderNested classes/interfaces inherited from class org.opensearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode -
Field Summary
Fields inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
docCountProviderFields inherited from class org.opensearch.search.aggregations.AggregatorBase
collectableSubAggregators, context, DEFAULT_WEIGHT, name, parent, subAggregatorsFields inherited from class org.opensearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR -
Constructor Summary
ConstructorsConstructorDescriptionParentJoinAggregator(String name, AggregatorFactories factories, SearchContext context, Aggregator parent, org.apache.lucene.search.Query inFilter, org.apache.lucene.search.Query outFilter, ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, CardinalityUpperBound cardinality, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbeforeBuildingBuckets(long[] ordsToCollect) protected voiddoClose()final LeafBucketCollectorvoidMethods inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
bucketComparator, bucketDocCount, buildAggregationsForFixedBucketCount, buildAggregationsForSingleBucket, buildAggregationsForVariableBuckets, buildSubAggsForAllBuckets, buildSubAggsForBuckets, buildSubAggsForBuckets, close, collectBucket, collectExistingBucket, descendsFromGlobalAggregator, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, mergeBuckets, mergeBuckets, preGetSubLeafCollectors, resolveSortPathMethods inherited from class org.opensearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, buildEmptySubAggregations, context, doPostCollection, doPreCollection, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, preCollection, scoreMode, subAggregator, subAggregators, toStringMethods inherited from class org.opensearch.search.aggregations.Aggregator
buildAggregations, buildEmptyAggregation, buildTopLevel, collectDebugInfo, resolveSortPathOnValidAggMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.search.Collector
setWeight
-
Constructor Details
-
ParentJoinAggregator
public ParentJoinAggregator(String name, AggregatorFactories factories, SearchContext context, Aggregator parent, org.apache.lucene.search.Query inFilter, org.apache.lucene.search.Query outFilter, ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
getLeafCollector
public final LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException - Specified by:
getLeafCollectorin classAggregatorBase- Throws:
IOException
-
postCollection
- Overrides:
postCollectionin classAggregatorBase- Throws:
IOException
-
beforeBuildingBuckets
- Overrides:
beforeBuildingBucketsin classBucketsAggregator- Throws:
IOException
-
doClose
protected void doClose()- Overrides:
doClosein classAggregatorBase
-