public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFactory implements Releasable
Modifier and Type | Class and Description |
---|---|
static class |
SignificantTermsAggregatorFactory.ExecutionMode |
ValuesSourceAggregatorFactory.LeafOnly<VS extends ValuesSource>
config
factories, name, parent, type
Constructor and Description |
---|
SignificantTermsAggregatorFactory(String name,
ValuesSourceConfig valueSourceConfig,
TermsAggregator.BucketCountThresholds bucketCountThresholds,
IncludeExclude includeExclude,
String executionHint,
org.apache.lucene.search.Filter filter,
SignificanceHeuristic significanceHeuristic) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Aggregator |
create(ValuesSource valuesSource,
long expectedBucketsCount,
AggregationContext aggregationContext,
Aggregator parent) |
protected Aggregator |
createUnmapped(AggregationContext aggregationContext,
Aggregator parent) |
long |
getBackgroundFrequency(org.apache.lucene.util.BytesRef termBytes) |
long |
getBackgroundFrequency(long term) |
protected TermsAggregator.BucketCountThresholds |
getBucketCountThresholds() |
SignificanceHeuristic |
getSignificanceHeuristic() |
long |
prepareBackground(AggregationContext context)
Creates the TermsEnum (if not already created) and must be called before any calls to getBackgroundFrequency
|
create, doValidate
parent, subFactories, validate
public SignificantTermsAggregatorFactory(String name, ValuesSourceConfig valueSourceConfig, TermsAggregator.BucketCountThresholds bucketCountThresholds, IncludeExclude includeExclude, String executionHint, org.apache.lucene.search.Filter filter, SignificanceHeuristic significanceHeuristic)
public SignificanceHeuristic getSignificanceHeuristic()
protected TermsAggregator.BucketCountThresholds getBucketCountThresholds()
protected Aggregator createUnmapped(AggregationContext aggregationContext, Aggregator parent)
createUnmapped
in class ValuesSourceAggregatorFactory
protected Aggregator create(ValuesSource valuesSource, long expectedBucketsCount, AggregationContext aggregationContext, Aggregator parent)
create
in class ValuesSourceAggregatorFactory
public long prepareBackground(AggregationContext context)
context
- The aggregation contextpublic long getBackgroundFrequency(org.apache.lucene.util.BytesRef termBytes)
public long getBackgroundFrequency(long term)
public void close() throws ElasticsearchException
close
in interface AutoCloseable
close
in interface Releasable
ElasticsearchException
Copyright © 2009–2015. All rights reserved.