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,ApiKeyQueryVariant,JsonpSerializable
@JsonpDeserializable
public class BoolQuery
extends QueryBase
implements ApiKeyQueryVariant, QueryVariant
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
QueryBase.AbstractBuilder<BuilderT extends QueryBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<BoolQuery>Json deserializer forBoolQuery -
Method Summary
Modifier and TypeMethodDescriptionApiKeyQuery variant kind.Query variant kind.filter()The clause (query) must appear in matching documents.booleanReturnstrueif this query has at least one should, must, must not or filter clause.final StringSpecifies the number or percentage ofshouldclauses 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 BoolQueryprotected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidshould()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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyQueryVariant
_toApiKeyQueryMethods inherited from interface co.elastic.clients.elasticsearch._types.query_dsl.QueryVariant
_toQuery
-
Field Details
-
_DESERIALIZER
Json deserializer forBoolQuery
-
-
Method Details
-
of
-
_apiKeyQueryKind
ApiKeyQuery variant kind.- Specified by:
_apiKeyQueryKindin interfaceApiKeyQueryVariant
-
_queryKind
Query variant kind.- Specified by:
_queryKindin 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 ofshouldclauses 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 of0is returned for all documents.API name:
must_not -
should
The clause (query) should appear in the matching document.API name:
should -
serializeInternal
- Overrides:
serializeInternalin classQueryBase
-
setupBoolQueryDeserializer
-
hasClauses
public boolean hasClauses()Returnstrueif this query has at least one should, must, must not or filter clause.
-