Class FiltersAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<FiltersAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketAggregationBase.AbstractBuilder<FiltersAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.FiltersAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<FiltersAggregation.Builder,,FiltersAggregation> MutableBuilder<FiltersAggregation.Builder,,FiltersAggregation> ObjectBuilder<FiltersAggregation>
- Enclosing class:
FiltersAggregation
public static class FiltersAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<FiltersAggregation.Builder>
implements CopyableBuilder<FiltersAggregation.Builder,FiltersAggregation>
Builder for
FiltersAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aFiltersAggregation.copy()Create a new builderCopyableBuilderthat is a copy of this one.API name:filtersAPI name:filtersBy default, the named filters aggregation returns the buckets as an object.otherBucket(Boolean value) Set totrueto add a bucket to the response which will contain all documents that do not match any of the given filters.otherBucketKey(String value) The key with which the other bucket is returned.protected FiltersAggregation.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<FiltersAggregation.Builder,FiltersAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<FiltersAggregation.Builder>
-
filters
API name:filters -
filters
@Nonnull public final FiltersAggregation.Builder filters(Function<Buckets.Builder<Query>, ObjectBuilder<Buckets<Query>>> fn) API name:filters -
keyed
By default, the named filters aggregation returns the buckets as an object. Set tofalseto return the buckets as an array of objects.API name:
keyed -
otherBucket
Set totrueto add a bucket to the response which will contain all documents that do not match any of the given filters.API name:
other_bucket -
otherBucketKey
The key with which the other bucket is returned.API name:
other_bucket_key -
build
Builds aFiltersAggregation.- Specified by:
buildin interfaceObjectBuilder<FiltersAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-