Class BucketSortAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<BucketSortAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketSortAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<BucketSortAggregation.Builder,,BucketSortAggregation> MutableBuilder<BucketSortAggregation.Builder,,BucketSortAggregation> ObjectBuilder<BucketSortAggregation>
- Enclosing class:
BucketSortAggregation
public static class BucketSortAggregation.Builder
extends AggregationBase.AbstractBuilder<BucketSortAggregation.Builder>
implements CopyableBuilder<BucketSortAggregation.Builder,BucketSortAggregation>
Builder for
BucketSortAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aBucketSortAggregation.copy()Create a new builderCopyableBuilderthat is a copy of this one.Buckets in positions prior tofromwill be truncated.API name:gap_policyprotected BucketSortAggregation.Builderself()The number of buckets to return.API name:sortsort(List<SortOptions> list) API name:sortsort(SortOptions value, SortOptions... values) API name:sortMethods 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<BucketSortAggregation.Builder,BucketSortAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<BucketSortAggregation.Builder>
-
from
Buckets in positions prior tofromwill be truncated.API name:
from -
gapPolicy
API name:gap_policy -
size
The number of buckets to return. Defaults to all buckets of the parent aggregation.API name:
size -
sort
API name:sortAdds all elements of
listtosort. -
sort
API name:sortAdds one or more values to
sort. -
sort
@Nonnull public final BucketSortAggregation.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) API name:sortAdds a value to
sortusing a builder lambda. -
build
Builds aBucketSortAggregation.- Specified by:
buildin interfaceObjectBuilder<BucketSortAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-