public class BooleanQuery extends SearchQuery
boost
Constructor and Description |
---|
BooleanQuery() |
Modifier and Type | Method and Description |
---|---|
BooleanQuery |
boost(double boost) |
BooleanQuery |
must(SearchQuery... mustQueries) |
BooleanQuery |
mustNot(SearchQuery... mustNotQueries) |
BooleanQuery |
should(SearchQuery... shouldQueries) |
BooleanQuery |
shouldMin(int minForShould)
Specifies the minimum number of "
should " conditions a document
has to meet in order to be included in the result set. |
com.couchbase.client.core.api.search.CoreSearchQuery |
toCore() |
booleanField, booleans, conjuncts, dateRange, disjuncts, docId, export, geoBoundingBox, geoBoundingBox, geoDistance, geoDistance, geoPolygon, match, matchAll, matchNone, matchPhrase, numericRange, phrase, prefix, queryString, regexp, term, termRange, toString, wildcard
public BooleanQuery shouldMin(int minForShould)
should
" conditions a document
has to meet in order to be included in the result set.
The default is zero, a special value that means different
things depending on whether a "must
" condition is present:
shouldMin = 0
is the same as shouldMin = 1
. In this case,
a document has to meet at least one "should" condition
(and none of the "mustNot
" conditions) in order to
be included in the result set.
shouldMin = 0
means the "should" conditions influence scoring
but are not used as document selection criteria.
In this case, only the "must" and "mustNot" conditions
affect whether a document is included in the result set.
BooleanQuery
has "must" conditions
as well as "should" conditions, and you want the "should" conditions
to affect which documents are included in the result set,
then call this method to set shouldMin
to a value greater than zero.should(SearchQuery...)
public BooleanQuery must(SearchQuery... mustQueries)
public BooleanQuery mustNot(SearchQuery... mustNotQueries)
public BooleanQuery should(SearchQuery... shouldQueries)
shouldMin(int)
public BooleanQuery boost(double boost)
boost
in class SearchQuery
public com.couchbase.client.core.api.search.CoreSearchQuery toCore()
toCore
in class SearchQuery
Copyright © 2024 Couchbase, Inc.. All rights reserved.