Class BoolQuery.Builder
- All Implemented Interfaces:
WithJson<BoolQuery.Builder>
,ObjectBuilder<BoolQuery>
- Enclosing class:
- BoolQuery
BoolQuery
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aBoolQuery
.final BoolQuery.Builder
The clause (query) must appear in matching documents.final BoolQuery.Builder
The clause (query) must appear in matching documents.final BoolQuery.Builder
The clause (query) must appear in matching documents.boolean
Returnstrue
if this query has at least one should, must, must not or filter clause.final BoolQuery.Builder
minimumShouldMatch
(String value) Specifies the number or percentage ofshould
clauses returned documents must match.final BoolQuery.Builder
The clause (query) must appear in matching documents and will contribute to the score.final BoolQuery.Builder
The clause (query) must appear in matching documents and will contribute to the score.final BoolQuery.Builder
The clause (query) must appear in matching documents and will contribute to the score.final BoolQuery.Builder
The clause (query) must not appear in the matching documents.final BoolQuery.Builder
The clause (query) must not appear in the matching documents.final BoolQuery.Builder
The clause (query) must not appear in the matching documents.protected BoolQuery.Builder
self()
final BoolQuery.Builder
The clause (query) should appear in the matching document.final BoolQuery.Builder
The clause (query) should appear in the matching document.final BoolQuery.Builder
The clause (query) should appear in the matching document.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
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
filter
The clause (query) must appear in matching documents. However, unlikemust
, the score of the query will be ignored.API name:
filter
Adds all elements of
list
tofilter
. -
filter
The clause (query) must appear in matching documents. However, unlikemust
, the score of the query will be ignored.API name:
filter
Adds one or more values to
filter
. -
filter
The clause (query) must appear in matching documents. However, unlikemust
, the score of the query will be ignored.API name:
filter
Adds a value to
filter
using a builder lambda. -
minimumShouldMatch
Specifies the number or percentage ofshould
clauses returned documents must match.API name:
minimum_should_match
-
must
The clause (query) must appear in matching documents and will contribute to the score.API name:
must
Adds all elements of
list
tomust
. -
must
The clause (query) must appear in matching documents and will contribute to the score.API name:
must
Adds one or more values to
must
. -
must
The clause (query) must appear in matching documents and will contribute to the score.API name:
must
Adds a value to
must
using a builder lambda. -
mustNot
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of0
is returned for all documents.API name:
must_not
Adds all elements of
list
tomustNot
. -
mustNot
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of0
is returned for all documents.API name:
must_not
Adds one or more values to
mustNot
. -
mustNot
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of0
is returned for all documents.API name:
must_not
Adds a value to
mustNot
using a builder lambda. -
should
The clause (query) should appear in the matching document.API name:
should
Adds all elements of
list
toshould
. -
should
The clause (query) should appear in the matching document.API name:
should
Adds one or more values to
should
. -
should
The clause (query) should appear in the matching document.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:
NullPointerException
- if some of the required fields are null.
-
hasClauses
public boolean hasClauses()Returnstrue
if this query has at least one should, must, must not or filter clause.
-