Class BucketSortAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BucketSortAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.BucketSortAggregation.Builder
- All Implemented Interfaces:
WithJson<BucketSortAggregation.Builder>,ObjectBuilder<BucketSortAggregation>
- Enclosing class:
- BucketSortAggregation
public static class BucketSortAggregation.Builder
extends AggregationBase.AbstractBuilder<BucketSortAggregation.Builder>
implements ObjectBuilder<BucketSortAggregation>
Builder for
BucketSortAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aBucketSortAggregation.Buckets in positions prior tofromwill be truncated.The policy to apply when gaps are found in the data.protected BucketSortAggregation.Builderself()The number of buckets to return.sort(SortOptions value, SortOptions... values) The list of fields to sort on.The list of fields to sort on.sort(List<SortOptions> list) The list of fields to sort on.Methods 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
-
from
Buckets in positions prior tofromwill be truncated.API name:
from -
gapPolicy
The policy to apply when gaps are found in the data.API name:
gap_policy -
size
The number of buckets to return. Defaults to all buckets of the parent aggregation.API name:
size -
sort
The list of fields to sort on.API name:
sortAdds all elements of
listtosort. -
sort
The list of fields to sort on.API name:
sortAdds one or more values to
sort. -
sort
public final BucketSortAggregation.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) The list of fields to sort on.API name:
sortAdds a value to
sortusing a builder lambda. -
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<BucketSortAggregation.Builder>
-
build
Builds aBucketSortAggregation.- Specified by:
buildin interfaceObjectBuilder<BucketSortAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-