Class FilterAggregatorFactory
java.lang.Object
org.elasticsearch.search.aggregations.AggregatorFactory
org.elasticsearch.search.aggregations.bucket.filter.FilterAggregatorFactory
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFilterAggregatorFactory
(String name, QueryBuilder filterBuilder, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptioncreateInternal
(Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) org.apache.lucene.search.Weight
Returns theWeight
for this filter aggregation, creating it if necessary.Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
create, doValidate, getParent, getStatsSubtype, name
-
Constructor Details
-
FilterAggregatorFactory
public FilterAggregatorFactory(String name, QueryBuilder filterBuilder, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
getWeight
public org.apache.lucene.search.Weight getWeight()Returns theWeight
for this filter aggregation, creating it if necessary. This is done lazily so that theWeight
is 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(Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOException- Specified by:
createInternal
in classAggregatorFactory
- Throws:
IOException
-