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.Builder
Determines how child aggregations should be calculated: breadth-first or depth-first.final TermsAggregation.Builder
exclude
(TermsExclude value) Values to exclude.final TermsAggregation.Builder
Values to exclude.final TermsAggregation.Builder
Determines whether the aggregation will use field values directly or global ordinals.final TermsAggregation.Builder
The field from which to return terms.final TermsAggregation.Builder
API name:format
final TermsAggregation.Builder
include
(TermsInclude value) Values to include.final TermsAggregation.Builder
Values to include.final TermsAggregation.Builder
minDocCount
(Integer value) Only return values that are found in more thanmin_doc_count
hits.final TermsAggregation.Builder
missing
(boolean value) The value to apply to documents that do not have a value.final TermsAggregation.Builder
missing
(double value) The value to apply to documents that do not have a value.final TermsAggregation.Builder
missing
(long value) The value to apply to documents that do not have a value.final TermsAggregation.Builder
missing
(FieldValue value) The value to apply to documents that do not have a value.final TermsAggregation.Builder
The value to apply to documents that do not have a value.final TermsAggregation.Builder
The value to apply to documents that do not have a value.final TermsAggregation.Builder
missingBucket
(Boolean value) API name:missing_bucket
final TermsAggregation.Builder
missingOrder
(MissingOrder value) API name:missing_order
final TermsAggregation.Builder
order
(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) Specifies the sort order of the buckets.final TermsAggregation.Builder
order
(List<NamedValue<SortOrder>> list) Specifies the sort order of the buckets.final TermsAggregation.Builder
API name:script
final TermsAggregation.Builder
API name:script
protected TermsAggregation.Builder
self()
final TermsAggregation.Builder
The number of candidate terms produced by each shard.final TermsAggregation.Builder
showTermDocCountError
(Boolean value) Set totrue
to return thedoc_count_error_upper_bound
, which is an upper bound to the error on thedoc_count
returned by each shard.final TermsAggregation.Builder
The number of buckets returned out of the overall terms list.final TermsAggregation.Builder
Coerced unmapped fields into the specified type.Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, name
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods 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_count
hits.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:
order
Adds all elements of
list
toorder
. -
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:
order
Adds 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_size
will be automatically estimated based on the number of shards and thesize
parameter.API name:
shard_size
-
showTermDocCountError
Set totrue
to return thedoc_count_error_upper_bound
, which is an upper bound to the error on thedoc_count
returned 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:
self
in classAggregationBase.AbstractBuilder<TermsAggregation.Builder>
-
build
Builds aTermsAggregation
.- Specified by:
build
in interfaceObjectBuilder<TermsAggregation>
- Throws:
NullPointerException
- if some of the required fields are null.
-