Class MultiTermsAggregation.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<MultiTermsAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.MultiTermsAggregation.Builder
- All Implemented Interfaces:
WithJson<MultiTermsAggregation.Builder>,ObjectBuilder<MultiTermsAggregation>
- Enclosing class:
- MultiTermsAggregation
public static class MultiTermsAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<MultiTermsAggregation.Builder>
implements ObjectBuilder<MultiTermsAggregation>
Builder for
MultiTermsAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aMultiTermsAggregation.Specifies the strategy for data collection.minDocCount(Long value) The minimum number of documents in a bucket for it to be returned.order(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) Specifies the sort order of the buckets.order(List<NamedValue<SortOrder>> list) Specifies the sort order of the buckets.protected MultiTermsAggregation.Builderself()shardMinDocCount(Long value) The minimum number of documents in a bucket on each shard for it to be returned.The number of candidate terms produced by each shard.showTermDocCountError(Boolean value) Calculates the doc count error on per term basis.The number of term buckets should be returned out of the overall terms list.terms(MultiTermLookup value, MultiTermLookup... values) Required - The field from which to generate sets of terms.Required - The field from which to generate sets of terms.terms(List<MultiTermLookup> list) Required - The field from which to generate sets of terms.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
Specifies the strategy for data collection.API name:
collect_mode -
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 MultiTermsAggregation.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. -
minDocCount
The minimum number of documents in a bucket for it to be returned.API name:
min_doc_count -
shardMinDocCount
The minimum number of documents in a bucket on each shard for it to be returned.API name:
shard_min_doc_count -
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
Calculates the doc count error on per term basis.API name:
show_term_doc_count_error -
size
The number of term buckets should be returned out of the overall terms list.API name:
size -
terms
Required - The field from which to generate sets of terms.API name:
termsAdds all elements of
listtoterms. -
terms
Required - The field from which to generate sets of terms.API name:
termsAdds one or more values to
terms. -
terms
public final MultiTermsAggregation.Builder terms(Function<MultiTermLookup.Builder, ObjectBuilder<MultiTermLookup>> fn) Required - The field from which to generate sets of terms.API name:
termsAdds a value to
termsusing a builder lambda. -
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<MultiTermsAggregation.Builder>
-
build
Builds aMultiTermsAggregation.- Specified by:
buildin interfaceObjectBuilder<MultiTermsAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-