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(String name, List<FiltersAggregator.KeyedFilter> filters, boolean keyed, boolean otherBucket, String otherBucketKey, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactories, Map<String,Object> metaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregatorcreateInternal(SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)Weight[]getWeights(SearchContext searchContext)Returns theWeights for this filter aggregation, creating it if necessary.-
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
asMultiBucketAggregator, create, doValidate, getParent, name
-
-
-
-
Constructor Detail
-
FiltersAggregatorFactory
public FiltersAggregatorFactory(String name, List<FiltersAggregator.KeyedFilter> filters, boolean keyed, boolean otherBucket, String otherBucketKey, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactories, Map<String,Object> metaData) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getWeights
public Weight[] getWeights(SearchContext searchContext)
Returns theWeights for this filter aggregation, creating it if necessary. This is done lazily so that theWeights 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, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData) throws IOException
- Specified by:
createInternalin classAggregatorFactory- Throws:
IOException
-
-