Class AdjacencyMatrixAggregator
- 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.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.lucene.search.Collector
,Releasable
public class AdjacencyMatrixAggregator extends BucketsAggregator
Aggregation for adjacency matrices. TODO the aggregation produces a sparse response but in the computation it uses a non-sparse structure (an array of Bits objects). This could be changed to a sparse structure in future.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AdjacencyMatrixAggregator.KeyedFilter
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator
Aggregator.Parser, Aggregator.SubAggCollectionMode
-
-
Field Summary
Fields Modifier and Type Field Description static ParseField
FILTERS_FIELD
-
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 AdjacencyMatrixAggregator(java.lang.String name, AggregatorFactories factories, java.lang.String separator, java.lang.String[] keys, org.apache.lucene.search.Weight[] filters, SearchContext context, Aggregator parent, java.util.List<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 InternalAggregation
buildAggregation(long owningBucketOrdinal)
Build an aggregation for data that has been collected intobucket
.InternalAggregation
buildEmptyAggregation()
Build an empty aggregation.LeafBucketCollector
getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub)
Get aLeafBucketCollector
for the given ctx, which should delegate to the given collector.-
Methods inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
bucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectExistingBucket, consumeBucketsAndMaybeBreak, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, mergeBuckets
-
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, buildEmptySubAggregations, context, doClose, doPostCollection, doPreCollection, getLeafCollector, metaData, name, parent, pipelineAggregators, postCollection, preCollection, preGetSubLeafCollectors, scoreMode, subAggregator, subAggregators, toString
-
Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
descendsFromBucketAggregator
-
-
-
-
Field Detail
-
FILTERS_FIELD
public static final ParseField FILTERS_FIELD
-
-
Constructor Detail
-
AdjacencyMatrixAggregator
public AdjacencyMatrixAggregator(java.lang.String name, AggregatorFactories factories, java.lang.String separator, java.lang.String[] keys, org.apache.lucene.search.Weight[] filters, SearchContext context, Aggregator parent, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getLeafCollector
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) throws java.io.IOException
Description copied from class:AggregatorBase
Get aLeafBucketCollector
for the given ctx, which should delegate to the given collector.- Specified by:
getLeafCollector
in classAggregatorBase
- Throws:
java.io.IOException
-
buildAggregation
public InternalAggregation buildAggregation(long owningBucketOrdinal) throws java.io.IOException
Description copied from class:Aggregator
Build an aggregation for data that has been collected intobucket
.- Specified by:
buildAggregation
in classAggregator
- Throws:
java.io.IOException
-
buildEmptyAggregation
public InternalAggregation buildEmptyAggregation()
Description copied from class:Aggregator
Build an empty aggregation.- Specified by:
buildEmptyAggregation
in classAggregator
-
-