Class FiltersAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase.AbstractBuilder<FiltersAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.FiltersAggregation.Builder
- All Implemented Interfaces:
WithJson<FiltersAggregation.Builder>
,ObjectBuilder<FiltersAggregation>
- Enclosing class:
- FiltersAggregation
public static class FiltersAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<FiltersAggregation.Builder>
implements ObjectBuilder<FiltersAggregation>
Builder for
FiltersAggregation
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aFiltersAggregation
.Collection of queries from which to build buckets.Collection of queries from which to build buckets.By default, the named filters aggregation returns the buckets as an object.otherBucket
(Boolean value) Set totrue
to 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.Builder
self()
Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, name
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
filters
Collection of queries from which to build buckets.API name:
filters
-
filters
public final FiltersAggregation.Builder filters(Function<Buckets.Builder<Query>, ObjectBuilder<Buckets<Query>>> fn) Collection of queries from which to build buckets.API name:
filters
-
otherBucket
Set totrue
to 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
-
keyed
By default, the named filters aggregation returns the buckets as an object. Set tofalse
to return the buckets as an array of objects.API name:
keyed
-
self
- Specified by:
self
in classAggregationBase.AbstractBuilder<FiltersAggregation.Builder>
-
build
Builds aFiltersAggregation
.- Specified by:
build
in interfaceObjectBuilder<FiltersAggregation>
- Throws:
NullPointerException
- if some of the required fields are null.
-