public class TermsAggregatorBuilder extends ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>
ValuesSourceAggregatorBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregatorBuilder<VS,AB>>
Writeable.Reader<R>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static ParseField |
EXECUTION_HINT_FIELD_NAME |
static ParseField |
MIN_DOC_COUNT_FIELD_NAME |
static ParseField |
ORDER_FIELD |
static ParseField |
REQUIRED_SIZE_FIELD_NAME |
static ParseField |
SHARD_MIN_DOC_COUNT_FIELD_NAME |
static ParseField |
SHARD_SIZE_FIELD_NAME |
static ParseField |
SHOW_TERM_DOC_COUNT_ERROR |
config
factoriesBuilder, metaData, name, type
EMPTY_PARAMS
Constructor and Description |
---|
TermsAggregatorBuilder(java.lang.String name,
ValueType valueType) |
Modifier and Type | Method and Description |
---|---|
TermsAggregator.BucketCountThresholds |
bucketCountThresholds() |
TermsAggregatorBuilder |
bucketCountThresholds(TermsAggregator.BucketCountThresholds bucketCountThresholds) |
Aggregator.SubAggCollectionMode |
collectMode()
Expert: get the collection mode.
|
TermsAggregatorBuilder |
collectMode(Aggregator.SubAggCollectionMode collectMode)
Expert: set the collection mode.
|
protected XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
executionHint()
Expert: gets an execution hint to the aggregation.
|
TermsAggregatorBuilder |
executionHint(java.lang.String executionHint)
Expert: sets an execution hint to the aggregation.
|
IncludeExclude |
includeExclude()
Get terms to include and exclude from the aggregation results
|
TermsAggregatorBuilder |
includeExclude(IncludeExclude includeExclude)
Set terms to include and exclude from the aggregation results
|
protected ValuesSourceAggregatorFactory<ValuesSource,?> |
innerBuild(AggregationContext context,
ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected boolean |
innerEquals(java.lang.Object obj) |
protected int |
innerHashCode() |
protected TermsAggregatorBuilder |
innerReadFrom(java.lang.String name,
ValuesSourceType valuesSourceType,
ValueType targetValueType,
StreamInput in) |
protected void |
innerWriteTo(StreamOutput out) |
TermsAggregatorBuilder |
minDocCount(long minDocCount)
Set the minimum document count terms should have in order to appear in
the response.
|
Terms.Order |
order()
Gets the order in which the buckets will be returned.
|
TermsAggregatorBuilder |
order(java.util.List<Terms.Order> orders)
Sets the order in which the buckets will be returned.
|
TermsAggregatorBuilder |
order(Terms.Order order)
Sets the order in which the buckets will be returned.
|
TermsAggregatorBuilder |
shardMinDocCount(long shardMinDocCount)
Set the minimum document count terms should have on the shard in order to
appear in the response.
|
TermsAggregatorBuilder |
shardSize(int shardSize)
Sets the shard_size - indicating the number of term buckets each shard
will return to the coordinating node (the node that coordinates the
search execution).
|
boolean |
showTermDocCountError()
Get whether doc count error will be return for individual terms
|
TermsAggregatorBuilder |
showTermDocCountError(boolean showTermDocCountError)
Set whether doc count error will be return for individual terms
|
TermsAggregatorBuilder |
size(int size)
Sets the size - indicating how many term buckets should be returned
(defaults to 10)
|
config, doBuild, doEquals, doHashCode, doReadFrom, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, script, timeZone, timeZone, valueType, valueType
build, equals, getType, getWriteableName, hashCode, readFrom, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
buildAsBytes, buildAsBytes, toString
public static final ParseField EXECUTION_HINT_FIELD_NAME
public static final ParseField SHARD_SIZE_FIELD_NAME
public static final ParseField MIN_DOC_COUNT_FIELD_NAME
public static final ParseField SHARD_MIN_DOC_COUNT_FIELD_NAME
public static final ParseField REQUIRED_SIZE_FIELD_NAME
public static final ParseField SHOW_TERM_DOC_COUNT_ERROR
public static final ParseField ORDER_FIELD
public TermsAggregatorBuilder(java.lang.String name, ValueType valueType)
public TermsAggregator.BucketCountThresholds bucketCountThresholds()
public TermsAggregatorBuilder bucketCountThresholds(TermsAggregator.BucketCountThresholds bucketCountThresholds)
public TermsAggregatorBuilder size(int size)
public TermsAggregatorBuilder shardSize(int shardSize)
public TermsAggregatorBuilder minDocCount(long minDocCount)
public TermsAggregatorBuilder shardMinDocCount(long shardMinDocCount)
public TermsAggregatorBuilder order(Terms.Order order)
public TermsAggregatorBuilder order(java.util.List<Terms.Order> orders)
public Terms.Order order()
public TermsAggregatorBuilder executionHint(java.lang.String executionHint)
public java.lang.String executionHint()
public TermsAggregatorBuilder collectMode(Aggregator.SubAggCollectionMode collectMode)
public Aggregator.SubAggCollectionMode collectMode()
public TermsAggregatorBuilder includeExclude(IncludeExclude includeExclude)
public IncludeExclude includeExclude()
public boolean showTermDocCountError()
public TermsAggregatorBuilder showTermDocCountError(boolean showTermDocCountError)
protected ValuesSourceAggregatorFactory<ValuesSource,?> innerBuild(AggregationContext context, ValuesSourceConfig<ValuesSource> config, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
innerBuild
in class ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>
java.io.IOException
protected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>
java.io.IOException
protected TermsAggregatorBuilder innerReadFrom(java.lang.String name, ValuesSourceType valuesSourceType, ValueType targetValueType, StreamInput in) throws java.io.IOException
innerReadFrom
in class ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>
java.io.IOException
protected void innerWriteTo(StreamOutput out) throws java.io.IOException
innerWriteTo
in class ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>
java.io.IOException
protected int innerHashCode()
innerHashCode
in class ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>
protected boolean innerEquals(java.lang.Object obj)
innerEquals
in class ValuesSourceAggregatorBuilder<ValuesSource,TermsAggregatorBuilder>