Package com.mongodb.client.model.search
Interface ShouldCompoundSearchOperator
- All Superinterfaces:
Bson,CompoundSearchOperator,CompoundSearchOperatorBase,SearchOperator
A representation of a
CompoundSearchOperator that allows changing
should-specific options, if any.
This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.- Since:
- 4.7
- See Also:
-
Field Summary
Fields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY -
Method Summary
Modifier and TypeMethodDescriptionminimumShouldMatch(int minimumShouldMatch) Creates a newShouldCompoundSearchOperatorthat requires at least the requested number of clauses of those specified viaCompoundSearchOperatorBase.should(Iterable)to be satisfied.score(SearchScore modifier) Creates a newSearchOperatorwith the scoring modifier specified.Methods inherited from interface org.bson.conversions.Bson
toBsonDocument, toBsonDocumentMethods inherited from interface com.mongodb.client.model.search.CompoundSearchOperatorBase
filter, must, mustNot, should
-
Method Details
-
score
Description copied from interface:SearchOperatorCreates a newSearchOperatorwith the scoring modifier specified.- Specified by:
scorein interfaceCompoundSearchOperator- Specified by:
scorein interfaceSearchOperator- Parameters:
modifier- The scoring modifier.- Returns:
- A new
SearchOperator.
-
minimumShouldMatch
Creates a newShouldCompoundSearchOperatorthat requires at least the requested number of clauses of those specified viaCompoundSearchOperatorBase.should(Iterable)to be satisfied.- Parameters:
minimumShouldMatch- The minimum number of clauses that must be satisfied.- Returns:
- A new
ShouldCompoundSearchOperator.
-