Class BoolQuery.Builder
- All Implemented Interfaces:
WithJson<BoolQuery.Builder>,ObjectBuilder<BoolQuery>
- Enclosing class:
- BoolQuery
BoolQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aBoolQuery.final BoolQuery.BuilderThe clause (query) must appear in matching documents.final BoolQuery.BuilderThe clause (query) must appear in matching documents.final BoolQuery.BuilderThe clause (query) must appear in matching documents.booleanReturnstrueif this query has at least one should, must, must not or filter clause.final BoolQuery.BuilderminimumShouldMatch(String value) Specifies the number or percentage ofshouldclauses returned documents must match.final BoolQuery.BuilderThe clause (query) must appear in matching documents and will contribute to the score.final BoolQuery.BuilderThe clause (query) must appear in matching documents and will contribute to the score.final BoolQuery.BuilderThe clause (query) must appear in matching documents and will contribute to the score.final BoolQuery.BuilderThe clause (query) must not appear in the matching documents.final BoolQuery.BuilderThe clause (query) must not appear in the matching documents.final BoolQuery.BuilderThe clause (query) must not appear in the matching documents.protected BoolQuery.Builderself()final BoolQuery.BuilderThe clause (query) should appear in the matching document.final BoolQuery.BuilderThe clause (query) should appear in the matching document.final BoolQuery.BuilderThe clause (query) should appear in the matching document.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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:
filterAdds all elements of
listtofilter. -
filter
The clause (query) must appear in matching documents. However, unlikemust, the score of the query will be ignored.API name:
filterAdds 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:
filterAdds a value to
filterusing a builder lambda. -
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:
mustAdds all elements of
listtomust. -
must
The clause (query) must appear in matching documents and will contribute to the score.API name:
mustAdds one or more values to
must. -
must
The clause (query) must appear in matching documents and will contribute to the score.API name:
mustAdds a value to
mustusing a builder lambda. -
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_notAdds all elements of
listtomustNot. -
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_notAdds one or more values to
mustNot. -
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_notAdds a value to
mustNotusing a builder lambda. -
should
The clause (query) should appear in the matching document.API name:
shouldAdds all elements of
listtoshould. -
should
The clause (query) should appear in the matching document.API name:
shouldAdds one or more values to
should. -
should
The clause (query) should appear in the matching document.API name:
shouldAdds a value to
shouldusing a builder lambda. -
self
- Specified by:
selfin classQueryBase.AbstractBuilder<BoolQuery.Builder>
-
build
Builds aBoolQuery.- Specified by:
buildin interfaceObjectBuilder<BoolQuery>- Throws:
NullPointerException- if some of the required fields are null.
-
hasClauses
public boolean hasClauses()Returnstrueif this query has at least one should, must, must not or filter clause.
-