Class BoolQuery
java.lang.Object
org.opensearch.client.opensearch._types.query_dsl.QueryBase
org.opensearch.client.opensearch._types.query_dsl.BoolQuery
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,QueryVariant,ToCopyableBuilder<BoolQuery.Builder,BoolQuery>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class BoolQuery
extends QueryBase
implements QueryVariant, ToCopyableBuilder<BoolQuery.Builder,BoolQuery>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._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 TypeMethodDescriptionQueryvariant kind.final BooleanEnsures correct behavior when a query contains onlymust_notclauses.static BoolQuery.Builderbuilder()booleanfilter()The clause (query) must appear in matching documents.inthashCode()final StringAPI name:minimum_should_matchmust()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.Create a new builderToCopyableBuilderthat is initialised with the current state of this object.Methods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase
boost, queryName, serialize, setupQueryBaseDeserializerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.opensearch._types.query_dsl.QueryVariant
toQueryMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forBoolQuery
-
-
Method Details
-
of
-
_queryKind
Queryvariant kind.- Specified by:
_queryKindin interfaceQueryVariant
-
adjustPureNegative
Ensures correct behavior when a query contains onlymust_notclauses. By default set to true, OpenSearch adds a match-all clause to ensure results are returned from Lucene, with themust_notconditions applied as filters. If set to false, the query may return no results, as Lucene typically requires at least one positive condition.API name:
adjust_pure_negative -
filter
The clause (query) must appear in matching documents. However, unlikemust, the score of the query will be ignored.API name:
filter -
minimumShouldMatch
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
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<BoolQuery.Builder,BoolQuery> - Returns:
- a new builder instance.
-
builder
-
setupBoolQueryDeserializer
-
hashCode
public int hashCode() -
equals
-