Class TermsAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase.AbstractBuilder<TermsAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.TermsAggregation.Builder
- All Implemented Interfaces:
WithJson<TermsAggregation.Builder>,ObjectBuilder<TermsAggregation>
- Enclosing class:
- TermsAggregation
public static class TermsAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<TermsAggregation.Builder>
implements ObjectBuilder<TermsAggregation>
Builder for
TermsAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTermsAggregation.final TermsAggregation.BuilderDetermines how child aggregations should be calculated: breadth-first or depth-first.final TermsAggregation.Builderexclude(TermsExclude value) Values to exclude.final TermsAggregation.BuilderValues to exclude.final TermsAggregation.BuilderDetermines whether the aggregation will use field values directly or global ordinals.final TermsAggregation.BuilderThe field from which to return terms.final TermsAggregation.BuilderAPI name:formatfinal TermsAggregation.Builderinclude(TermsInclude value) Values to include.final TermsAggregation.BuilderValues to include.final TermsAggregation.BuilderminDocCount(Integer value) Only return values that are found in more thanmin_doc_counthits.final TermsAggregation.Buildermissing(boolean value) The value to apply to documents that do not have a value.final TermsAggregation.Buildermissing(double value) The value to apply to documents that do not have a value.final TermsAggregation.Buildermissing(long value) The value to apply to documents that do not have a value.final TermsAggregation.Buildermissing(FieldValue value) The value to apply to documents that do not have a value.final TermsAggregation.BuilderThe value to apply to documents that do not have a value.final TermsAggregation.BuilderThe value to apply to documents that do not have a value.final TermsAggregation.BuildermissingBucket(Boolean value) API name:missing_bucketfinal TermsAggregation.BuildermissingOrder(MissingOrder value) API name:missing_orderfinal TermsAggregation.Builderorder(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) Specifies the sort order of the buckets.final TermsAggregation.Builderorder(List<NamedValue<SortOrder>> list) Specifies the sort order of the buckets.final TermsAggregation.BuilderAPI name:scriptfinal TermsAggregation.BuilderAPI name:scriptprotected TermsAggregation.Builderself()final TermsAggregation.BuilderThe number of candidate terms produced by each shard.final TermsAggregation.BuildershowTermDocCountError(Boolean value) Set totrueto return thedoc_count_error_upper_bound, which is an upper bound to the error on thedoc_countreturned by each shard.final TermsAggregation.BuilderThe number of buckets returned out of the overall terms list.final TermsAggregation.BuilderCoerced unmapped fields into the specified type.Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, nameMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
collectMode
Determines how child aggregations should be calculated: breadth-first or depth-first.API name:
collect_mode -
exclude
Values to exclude. Accepts regular expressions and partitions.API name:
exclude -
exclude
public final TermsAggregation.Builder exclude(Function<TermsExclude.Builder, ObjectBuilder<TermsExclude>> fn) Values to exclude. Accepts regular expressions and partitions.API name:
exclude -
executionHint
Determines whether the aggregation will use field values directly or global ordinals.API name:
execution_hint -
field
The field from which to return terms.API name:
field -
include
Values to include. Accepts regular expressions and partitions.API name:
include -
include
public final TermsAggregation.Builder include(Function<TermsInclude.Builder, ObjectBuilder<TermsInclude>> fn) Values to include. Accepts regular expressions and partitions.API name:
include -
minDocCount
Only return values that are found in more thanmin_doc_counthits.API name:
min_doc_count -
missing
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
missing
public final TermsAggregation.Builder missing(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
missing
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
missing
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
missing
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
missing
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
missingOrder
API name:missing_order -
missingBucket
API name:missing_bucket -
valueType
Coerced unmapped fields into the specified type.API name:
value_type -
order
Specifies the sort order of the buckets. Defaults to sorting by descending document count.API name:
orderAdds all elements of
listtoorder. -
order
public final TermsAggregation.Builder order(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) Specifies the sort order of the buckets. Defaults to sorting by descending document count.API name:
orderAdds one or more values to
order. -
script
API name:script -
script
API name:script -
shardSize
The number of candidate terms produced by each shard. By default,shard_sizewill be automatically estimated based on the number of shards and thesizeparameter.API name:
shard_size -
showTermDocCountError
Set totrueto return thedoc_count_error_upper_bound, which is an upper bound to the error on thedoc_countreturned by each shard.API name:
show_term_doc_count_error -
size
The number of buckets returned out of the overall terms list.API name:
size -
format
API name:format -
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<TermsAggregation.Builder>
-
build
Builds aTermsAggregation.- Specified by:
buildin interfaceObjectBuilder<TermsAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-