Class RangeAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<RangeAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketAggregationBase.AbstractBuilder<RangeAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.RangeAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<RangeAggregation.Builder,,RangeAggregation> MutableBuilder<RangeAggregation.Builder,,RangeAggregation> ObjectBuilder<RangeAggregation>
- Enclosing class:
RangeAggregation
public static class RangeAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<RangeAggregation.Builder>
implements CopyableBuilder<RangeAggregation.Builder,RangeAggregation>
Builder for
RangeAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aRangeAggregation.copy()Create a new builderCopyableBuilderthat is a copy of this one.final RangeAggregation.BuilderAPI name:fieldfinal RangeAggregation.BuilderAPI name:formatfinal RangeAggregation.BuilderSet totrueto associate a unique string key with each bucket and return the ranges as a hash rather than an array.final RangeAggregation.BuilderThe value to apply to documents that do not have a value.final RangeAggregation.BuilderAn array of ranges used to bucket documents.final RangeAggregation.Builderranges(List<AggregationRange> list) An array of ranges used to bucket documents.final RangeAggregation.Builderranges(AggregationRange value, AggregationRange... values) An array of ranges used to bucket documents.final RangeAggregation.BuilderAPI name:scriptfinal RangeAggregation.BuilderAPI name:scriptprotected RangeAggregation.Builderself()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<RangeAggregation.Builder,RangeAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<RangeAggregation.Builder>
-
field
API name:field -
format
API name:format -
keyed
Set totrueto associate a unique string key with each bucket and return the ranges as a hash rather than an array.API name:
keyed -
missing
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing -
ranges
An array of ranges used to bucket documents.API name:
rangesAdds all elements of
listtoranges. -
ranges
@Nonnull public final RangeAggregation.Builder ranges(AggregationRange value, AggregationRange... values) An array of ranges used to bucket documents.API name:
rangesAdds one or more values to
ranges. -
ranges
@Nonnull public final RangeAggregation.Builder ranges(Function<AggregationRange.Builder, ObjectBuilder<AggregationRange>> fn) An array of ranges used to bucket documents.API name:
rangesAdds a value to
rangesusing a builder lambda. -
script
API name:script -
script
@Nonnull public final RangeAggregation.Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn) API name:script -
build
Builds aRangeAggregation.- Specified by:
buildin interfaceObjectBuilder<RangeAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-