Class SignificantTermsAggregatorFactory
- java.lang.Object
-
- org.elasticsearch.search.aggregations.AggregatorFactory<AF>
-
- org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory<ValuesSource,SignificantTermsAggregatorFactory>
-
- org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregatorFactory
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Releasable
public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource,SignificantTermsAggregatorFactory> implements Releasable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SignificantTermsAggregatorFactory.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
-
-
Constructor Summary
Constructors Constructor Description SignificantTermsAggregatorFactory(java.lang.String name, ValuesSourceConfig<ValuesSource> config, IncludeExclude includeExclude, java.lang.String executionHint, QueryBuilder filterBuilder, TermsAggregator.BucketCountThresholds bucketCountThresholds, SignificanceHeuristic significanceHeuristic, SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
Method Summary
Modifier and Type Method Description void
close()
protected Aggregator
createUnmapped(Aggregator parent, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
protected Aggregator
doCreateInternal(ValuesSource valuesSource, Aggregator parent, boolean collectsFromSingleBucket, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
long
getBackgroundFrequency(long termNum)
long
getBackgroundFrequency(org.apache.lucene.util.BytesRef termBytes)
long
getSupersetNumDocs()
Get the number of docs in the superset.-
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
createInternal, getConfig, timeZone
-
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
asMultiBucketAggregator, create, doValidate, getParent, name
-
-
-
-
Constructor Detail
-
SignificantTermsAggregatorFactory
public SignificantTermsAggregatorFactory(java.lang.String name, ValuesSourceConfig<ValuesSource> config, IncludeExclude includeExclude, java.lang.String executionHint, QueryBuilder filterBuilder, TermsAggregator.BucketCountThresholds bucketCountThresholds, SignificanceHeuristic significanceHeuristic, SearchContext 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 Detail
-
getSupersetNumDocs
public long getSupersetNumDocs()
Get the number of docs in the superset.
-
getBackgroundFrequency
public long getBackgroundFrequency(org.apache.lucene.util.BytesRef termBytes) throws java.io.IOException
- Throws:
java.io.IOException
-
getBackgroundFrequency
public long getBackgroundFrequency(long termNum) throws java.io.IOException
- Throws:
java.io.IOException
-
createUnmapped
protected Aggregator createUnmapped(Aggregator parent, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
- Specified by:
createUnmapped
in classValuesSourceAggregatorFactory<ValuesSource,SignificantTermsAggregatorFactory>
- Throws:
java.io.IOException
-
doCreateInternal
protected Aggregator doCreateInternal(ValuesSource valuesSource, 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:
doCreateInternal
in classValuesSourceAggregatorFactory<ValuesSource,SignificantTermsAggregatorFactory>
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceReleasable
-
-