Class SignificantTermsAggregatorFactory
- java.lang.Object
-
- org.elasticsearch.search.aggregations.AggregatorFactory
-
- org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory<ValuesSource>
-
- org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregatorFactory
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> implements Releasable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSignificantTermsAggregatorFactory.ExecutionMode-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
AggregatorFactory.MultiBucketAggregatorWrapper
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
config
-
Fields inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
factories, metaData, name, parent, queryShardContext
-
-
Constructor Summary
Constructors Constructor Description SignificantTermsAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, IncludeExclude includeExclude, String executionHint, QueryBuilder filterBuilder, TermsAggregator.BucketCountThresholds bucketCountThresholds, SignificanceHeuristic significanceHeuristic, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String,Object> metaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected AggregatorcreateUnmapped(SearchContext searchContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)protected AggregatordoCreateInternal(ValuesSource valuesSource, SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)longgetBackgroundFrequency(long termNum)longgetBackgroundFrequency(BytesRef termBytes)longgetSupersetNumDocs()Get the number of docs in the superset.-
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
createInternal, resolveMissingAny
-
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
asMultiBucketAggregator, create, doValidate, getParent, name
-
-
-
-
Constructor Detail
-
SignificantTermsAggregatorFactory
public SignificantTermsAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, IncludeExclude includeExclude, String executionHint, QueryBuilder filterBuilder, TermsAggregator.BucketCountThresholds bucketCountThresholds, SignificanceHeuristic significanceHeuristic, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String,Object> metaData) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSupersetNumDocs
public long getSupersetNumDocs()
Get the number of docs in the superset.
-
getBackgroundFrequency
public long getBackgroundFrequency(BytesRef termBytes) throws IOException
- Throws:
IOException
-
getBackgroundFrequency
public long getBackgroundFrequency(long termNum) throws IOException- Throws:
IOException
-
createUnmapped
protected Aggregator createUnmapped(SearchContext searchContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData) throws IOException
- Specified by:
createUnmappedin classValuesSourceAggregatorFactory<ValuesSource>- Throws:
IOException
-
doCreateInternal
protected Aggregator doCreateInternal(ValuesSource valuesSource, SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData) throws IOException
- Specified by:
doCreateInternalin classValuesSourceAggregatorFactory<ValuesSource>- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
-