Package com.mongodb.client.model.search
Interface PhraseSearchOperator
- All Superinterfaces:
org.bson.conversions.Bson,SearchOperator
- Since:
- 5.3
- See Also:
-
Field Summary
Fields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY -
Method Summary
Modifier and TypeMethodDescriptionscore(SearchScore modifier) Creates a newSearchOperatorwith the scoring modifier specified.slop(int slop) Creates a newPhraseSearchOperatorthat uses slop.Creates a newPhraseSearchOperatorthat uses synonyms.Methods inherited from interface org.bson.conversions.Bson
toBsonDocument, toBsonDocument
-
Method Details
-
score
Description copied from interface:SearchOperatorCreates a newSearchOperatorwith the scoring modifier specified.- Specified by:
scorein interfaceSearchOperator- Parameters:
modifier- The scoring modifier.- Returns:
- A new
SearchOperator.
-
slop
Creates a newPhraseSearchOperatorthat uses slop. The default value is 0.- Parameters:
slop- The allowable distance between words in the query phrase.- Returns:
- A new
PhraseSearchOperator.
-
synonyms
Creates a newPhraseSearchOperatorthat uses synonyms.- Parameters:
name- The name of the synonym mapping.- Returns:
- A new
PhraseSearchOperator. - MongoDB Atlas documentation
- Synonym mappings
-