Class TermsAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<TermsAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketAggregationBase.AbstractBuilder<TermsAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.TermsAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<TermsAggregation.Builder,,TermsAggregation> MutableBuilder<TermsAggregation.Builder,,TermsAggregation> ObjectBuilder<TermsAggregation>
- Enclosing class:
TermsAggregation
public static class TermsAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<TermsAggregation.Builder>
implements CopyableBuilder<TermsAggregation.Builder,TermsAggregation>
Builder for
TermsAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTermsAggregation.final TermsAggregation.BuilderAPI name:collect_modecopy()Create a new builderCopyableBuilderthat is a copy of this one.final TermsAggregation.BuilderAPI name:excludefinal TermsAggregation.Builderexclude(TermsExclude value) API name:excludefinal TermsAggregation.BuilderAPI name:execution_hintfinal TermsAggregation.BuilderAPI name:fieldfinal TermsAggregation.BuilderAPI name:formatfinal TermsAggregation.BuilderAPI name:includefinal TermsAggregation.Builderinclude(TermsInclude value) API name:includefinal TermsAggregation.BuilderminDocCount(Integer value) Only return values that are found in more thanmin_doc_counthits.final TermsAggregation.BuilderAPI name:missingfinal TermsAggregation.Buildermissing(FieldValue value) API name:missingfinal TermsAggregation.BuildermissingBucket(Boolean value) API name:missing_bucketfinal TermsAggregation.BuildermissingOrder(MissingOrder value) API name:missing_orderfinal TermsAggregation.BuilderAPI name:orderfinal TermsAggregation.BuilderAPI name:orderfinal 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 org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, nameMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<TermsAggregation.Builder,TermsAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<TermsAggregation.Builder>
-
collectMode
@Nonnull public final TermsAggregation.Builder collectMode(@Nullable TermsAggregationCollectMode value) API name:collect_mode -
exclude
API name:exclude -
exclude
@Nonnull public final TermsAggregation.Builder exclude(Function<TermsExclude.Builder, ObjectBuilder<TermsExclude>> fn) API name:exclude -
executionHint
@Nonnull public final TermsAggregation.Builder executionHint(@Nullable TermsAggregationExecutionHint value) API name:execution_hint -
field
API name:field -
format
API name:format -
include
API name:include -
include
@Nonnull public final TermsAggregation.Builder include(Function<TermsInclude.Builder, ObjectBuilder<TermsInclude>> fn) API name:include -
minDocCount
Only return values that are found in more thanmin_doc_counthits.API name:
min_doc_count -
missing
API name:missing -
missing
@Nonnull public final TermsAggregation.Builder missing(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) API name:missing -
missingBucket
API name:missing_bucket -
missingOrder
API name:missing_order -
order
API name:orderAdds all elements of
listtoorder. -
order
@Nonnull public final TermsAggregation.Builder order(Map<String, SortOrder> value, Map<String, SortOrder>... values) API name:orderAdds one or more values to
order. -
script
API name:script -
script
@Nonnull public final TermsAggregation.Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn) 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 -
valueType
Coerced unmapped fields into the specified type.API name:
value_type -
build
Builds aTermsAggregation.- Specified by:
buildin interfaceObjectBuilder<TermsAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-