Class BoolQuery
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
co.elastic.clients.elasticsearch._types.query_dsl.BoolQuery
- All Implemented Interfaces:
QueryVariant
,JsonpSerializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
QueryBase.AbstractBuilder<BuilderT extends QueryBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<BoolQuery>
Json deserializer forBoolQuery
-
Method Summary
Modifier and TypeMethodDescriptionQuery variant kind.filter()
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 String
Specifies the number or percentage ofshould
clauses returned documents must match.must()
The clause (query) must appear in matching documents and will contribute to the score.mustNot()
The clause (query) must not appear in the matching documents.static BoolQuery
protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
should()
The clause (query) should appear in the matching document.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
boost, queryName, serialize, setupQueryBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch._types.query_dsl.QueryVariant
_toQuery
-
Field Details
-
_DESERIALIZER
Json deserializer forBoolQuery
-
-
Method Details
-
of
-
_queryKind
Query variant kind.- Specified by:
_queryKind
in interfaceQueryVariant
-
filter
The clause (query) must appear in matching documents. However, unlikemust
, the score of the query will be ignored.API name:
filter
-
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
-
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
-
should
The clause (query) should appear in the matching document.API name:
should
-
serializeInternal
- Overrides:
serializeInternal
in classQueryBase
-
setupBoolQueryDeserializer
-
hasClauses
public boolean hasClauses()Returnstrue
if this query has at least one should, must, must not or filter clause.
-