Class FilterAggregatorFactory
java.lang.Object
org.elasticsearch.search.aggregations.AggregatorFactory
org.elasticsearch.search.aggregations.bucket.filter.FilterAggregatorFactory
public class FilterAggregatorFactory extends AggregatorFactory
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FilterAggregatorFactory(java.lang.String name, QueryBuilder filterBuilder, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metadata)
-
Method Summary
Modifier and Type Method Description Aggregator
createInternal(Aggregator parent, CardinalityUpperBound cardinality, java.util.Map<java.lang.String,java.lang.Object> metadata)
org.apache.lucene.search.Weight
getWeight()
Returns theWeight
for this filter aggregation, creating it if necessary.Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
create, doValidate, getParent, getStatsSubtype, name
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FilterAggregatorFactory
public FilterAggregatorFactory(java.lang.String name, QueryBuilder filterBuilder, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOException- Throws:
java.io.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, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOException- Specified by:
createInternal
in classAggregatorFactory
- Throws:
java.io.IOException
-