public class TermsAggregationBuilder extends ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>>AggregationBuilder.CommonFieldsWriteable.Reader<V>, Writeable.Writer<V>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 java.lang.String |
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 |
configmetaDatafactoriesBuilder, nameEMPTY_PARAMS| Constructor and Description |
|---|
TermsAggregationBuilder(StreamInput in)
Read from a stream.
|
TermsAggregationBuilder(java.lang.String name,
ValueType valueType) |
| Modifier and Type | Method and Description |
|---|---|
Aggregator.SubAggCollectionMode |
collectMode()
Expert: get the collection mode.
|
TermsAggregationBuilder |
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.
|
TermsAggregationBuilder |
executionHint(java.lang.String executionHint)
Expert: sets an execution hint to the aggregation.
|
java.lang.String |
getType()
The name of the type of aggregation built by this builder.
|
IncludeExclude |
includeExclude()
Get terms to include and exclude from the aggregation results
|
TermsAggregationBuilder |
includeExclude(IncludeExclude includeExclude)
Set terms to include and exclude from the aggregation results
|
protected ValuesSourceAggregatorFactory<ValuesSource,?> |
innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected boolean |
innerEquals(java.lang.Object obj) |
protected int |
innerHashCode() |
protected void |
innerWriteTo(StreamOutput out)
Write subclass's state to the stream.
|
long |
minDocCount()
Returns the minimum document count required per term
|
TermsAggregationBuilder |
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.
|
TermsAggregationBuilder |
order(java.util.List<Terms.Order> orders)
Sets the order in which the buckets will be returned.
|
TermsAggregationBuilder |
order(Terms.Order order)
Sets the order in which the buckets will be returned.
|
static AggregationBuilder |
parse(java.lang.String aggregationName,
QueryParseContext context) |
protected boolean |
serializeTargetValueType()
Should this builder serialize its targetValueType? Defaults to false.
|
TermsAggregationBuilder |
shardMinDocCount(long shardMinDocCount)
Set the minimum document count terms should have on the shard in order to
appear in the response.
|
TermsAggregationBuilder |
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
|
TermsAggregationBuilder |
showTermDocCountError(boolean showTermDocCountError)
Set whether doc count error will be return for individual terms
|
TermsAggregationBuilder |
size(int size)
Sets the size - indicating how many term buckets should be returned
(defaults to 10)
|
doBuild, doEquals, doHashCode, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, script, timeZone, timeZone, valueType, valueTypebuild, equals, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTogetNamebuildAsBytes, buildAsBytes, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentpublic static final java.lang.String NAME
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 TermsAggregationBuilder(java.lang.String name,
ValueType valueType)
public TermsAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic static AggregationBuilder parse(java.lang.String aggregationName, QueryParseContext context) throws java.io.IOException
java.io.IOExceptionprotected boolean serializeTargetValueType()
ValuesSourceAggregationBuilderserializeTargetValueType in class ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>protected void innerWriteTo(StreamOutput out) throws java.io.IOException
ValuesSourceAggregationBuilderinnerWriteTo in class ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>java.io.IOExceptionpublic TermsAggregationBuilder size(int size)
public TermsAggregationBuilder shardSize(int shardSize)
public TermsAggregationBuilder minDocCount(long minDocCount)
public long minDocCount()
public TermsAggregationBuilder shardMinDocCount(long shardMinDocCount)
public TermsAggregationBuilder order(Terms.Order order)
public TermsAggregationBuilder order(java.util.List<Terms.Order> orders)
public Terms.Order order()
public TermsAggregationBuilder executionHint(java.lang.String executionHint)
public java.lang.String executionHint()
public TermsAggregationBuilder collectMode(Aggregator.SubAggCollectionMode collectMode)
public Aggregator.SubAggCollectionMode collectMode()
public TermsAggregationBuilder includeExclude(IncludeExclude includeExclude)
public IncludeExclude includeExclude()
public boolean showTermDocCountError()
public TermsAggregationBuilder showTermDocCountError(boolean showTermDocCountError)
protected ValuesSourceAggregatorFactory<ValuesSource,?> innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
innerBuild in class ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>java.io.IOExceptionprotected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody in class ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>java.io.IOExceptionprotected int innerHashCode()
innerHashCode in class ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>protected boolean innerEquals(java.lang.Object obj)
innerEquals in class ValuesSourceAggregationBuilder<ValuesSource,TermsAggregationBuilder>public java.lang.String getType()
BaseAggregationBuilder