Class HistogramAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<HistogramAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketAggregationBase.AbstractBuilder<HistogramAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.HistogramAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<HistogramAggregation.Builder,,HistogramAggregation> MutableBuilder<HistogramAggregation.Builder,,HistogramAggregation> ObjectBuilder<HistogramAggregation>
- Enclosing class:
HistogramAggregation
public static class HistogramAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<HistogramAggregation.Builder>
implements CopyableBuilder<HistogramAggregation.Builder,HistogramAggregation>
Builder for
HistogramAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aHistogramAggregation.copy()Create a new builderCopyableBuilderthat is a copy of this one.API name:extended_boundsextendedBounds(ExtendedBounds<Double> value) API name:extended_boundsAPI name:fieldAPI name:formatAPI name:hard_boundshardBounds(ExtendedBounds<Double> value) API name:hard_boundsThe interval for the buckets.Iftrue, returns buckets as a hash instead of an array, keyed by the bucket keys.minDocCount(Integer value) Only returns buckets that havemin_doc_countnumber of documents.The value to apply to documents that do not have a value.By default, the bucket keys start with 0 and then continue in even spaced steps ofinterval.API name:orderorder(HistogramOrder value) API name:orderAPI name:scriptAPI name:scriptprotected HistogramAggregation.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<HistogramAggregation.Builder,HistogramAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<HistogramAggregation.Builder>
-
extendedBounds
@Nonnull public final HistogramAggregation.Builder extendedBounds(@Nullable ExtendedBounds<Double> value) API name:extended_bounds -
extendedBounds
@Nonnull public final HistogramAggregation.Builder extendedBounds(Function<ExtendedBounds.Builder<Double>, ObjectBuilder<ExtendedBounds<Double>>> fn) API name:extended_bounds -
field
API name:field -
format
API name:format -
hardBounds
@Nonnull public final HistogramAggregation.Builder hardBounds(@Nullable ExtendedBounds<Double> value) API name:hard_bounds -
hardBounds
@Nonnull public final HistogramAggregation.Builder hardBounds(Function<ExtendedBounds.Builder<Double>, ObjectBuilder<ExtendedBounds<Double>>> fn) API name:hard_bounds -
interval
The interval for the buckets. Must be a positive decimal.API name:
interval -
keyed
Iftrue, returns buckets as a hash instead of an array, keyed by the bucket keys.API name:
keyed -
minDocCount
Only returns buckets that havemin_doc_countnumber of documents. By default, the response will fill gaps in the histogram with empty buckets.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 -
offset
By default, the bucket keys start with 0 and then continue in even spaced steps ofinterval. The bucket boundaries can be shifted by using theoffsetoption.API name:
offset -
order
API name:order -
order
@Nonnull public final HistogramAggregation.Builder order(Function<HistogramOrder.Builder, ObjectBuilder<HistogramOrder>> fn) API name:order -
script
API name:script -
script
@Nonnull public final HistogramAggregation.Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn) API name:script -
build
Builds aHistogramAggregation.- Specified by:
buildin interfaceObjectBuilder<HistogramAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-