Class FiltersAggregatorFactory
java.lang.Object
org.elasticsearch.search.aggregations.AggregatorFactory
org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregatorFactory
public class FiltersAggregatorFactory extends AggregatorFactory
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
AggregatorFactory.MultiBucketAggregatorWrapper
-
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
factories, metaData, name, parent, queryShardContext
-
Constructor Summary
Constructors Constructor Description FiltersAggregatorFactory(java.lang.String name, java.util.List<FiltersAggregator.KeyedFilter> filters, boolean keyed, boolean otherBucket, java.lang.String otherBucketKey, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactories, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
Method Summary
Modifier and Type Method Description Aggregator
createInternal(SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
org.apache.lucene.search.Weight[]
getWeights(SearchContext searchContext)
Returns theWeight
s for this filter aggregation, creating it if necessary.Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
asMultiBucketAggregator, create, doValidate, getParent, name
-
Constructor Details
-
FiltersAggregatorFactory
public FiltersAggregatorFactory(java.lang.String name, java.util.List<FiltersAggregator.KeyedFilter> filters, boolean keyed, boolean otherBucket, java.lang.String otherBucketKey, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactories, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
getWeights
Returns theWeight
s for this filter aggregation, creating it if necessary. This is done lazily so that theWeight
s are only created if the aggregation collects documents reducing the overhead of the aggregation in the case where no documents are collected. Note that as aggregations are initialsed and executed in a serial manner, no concurrency considerations are necessary here. -
createInternal
public Aggregator createInternal(SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException- Specified by:
createInternal
in classAggregatorFactory
- Throws:
java.io.IOException
-