Class BoolQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<BoolQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.BoolQuery.Builder
- All Implemented Interfaces:
WithJson<BoolQuery.Builder>
,ObjectBuilder<BoolQuery>
- Enclosing class:
- BoolQuery
public static class BoolQuery.Builder extends QueryBase.AbstractBuilder<BoolQuery.Builder> implements ObjectBuilder<BoolQuery>
Builder for
BoolQuery
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description BoolQuery
build()
Builds aBoolQuery
.BoolQuery.Builder
filter(Query value, Query... values)
API name:filter
BoolQuery.Builder
filter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
API name:filter
BoolQuery.Builder
filter(java.util.List<Query> list)
API name:filter
BoolQuery.Builder
minimumShouldMatch(java.lang.String value)
API name:minimum_should_match
BoolQuery.Builder
must(Query value, Query... values)
API name:must
BoolQuery.Builder
must(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
API name:must
BoolQuery.Builder
must(java.util.List<Query> list)
API name:must
BoolQuery.Builder
mustNot(Query value, Query... values)
API name:must_not
BoolQuery.Builder
mustNot(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
API name:must_not
BoolQuery.Builder
mustNot(java.util.List<Query> list)
API name:must_not
protected BoolQuery.Builder
self()
BoolQuery.Builder
should(Query value, Query... values)
API name:should
BoolQuery.Builder
should(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
API name:should
BoolQuery.Builder
should(java.util.List<Query> list)
API name:should
Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryName
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
filter
API name:filter
Adds all elements of
list
tofilter
. -
filter
API name:filter
Adds one or more values to
filter
. -
filter
public final BoolQuery.Builder filter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)API name:filter
Adds a value to
filter
using a builder lambda. -
minimumShouldMatch
API name:minimum_should_match
-
must
API name:must
Adds all elements of
list
tomust
. -
must
API name:must
Adds one or more values to
must
. -
must
public final BoolQuery.Builder must(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)API name:must
Adds a value to
must
using a builder lambda. -
mustNot
API name:must_not
Adds all elements of
list
tomustNot
. -
mustNot
API name:must_not
Adds one or more values to
mustNot
. -
mustNot
public final BoolQuery.Builder mustNot(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)API name:must_not
Adds a value to
mustNot
using a builder lambda. -
should
API name:should
Adds all elements of
list
toshould
. -
should
API name:should
Adds one or more values to
should
. -
should
public final BoolQuery.Builder should(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)API name:should
Adds a value to
should
using a builder lambda. -
self
- Specified by:
self
in classQueryBase.AbstractBuilder<BoolQuery.Builder>
-
build
Builds aBoolQuery
.- Specified by:
build
in interfaceObjectBuilder<BoolQuery>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-