Package com.mongodb.client.model.search
Interface TextSearchOperator
- All Superinterfaces:
Bson
,SearchOperator
- Since:
- 4.7
- See Also:
-
Field Summary
Fields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY
-
Method Summary
Modifier and TypeMethodDescriptionfuzzy()
Creates a newTextSearchOperator
that uses fuzzy search and does not use synonyms.fuzzy
(FuzzySearchOptions options) Creates a newTextSearchOperator
that uses fuzzy search and does not use synonyms.score
(SearchScore modifier) Creates a newSearchOperator
with the scoring modifier specified.Creates a newTextSearchOperator
that uses synonyms and does not use fuzzy search.Methods inherited from interface org.bson.conversions.Bson
toBsonDocument, toBsonDocument
-
Method Details
-
score
Description copied from interface:SearchOperator
Creates a newSearchOperator
with the scoring modifier specified.- Specified by:
score
in interfaceSearchOperator
- Parameters:
modifier
- The scoring modifier.- Returns:
- A new
SearchOperator
.
-
fuzzy
TextSearchOperator fuzzy()Creates a newTextSearchOperator
that uses fuzzy search and does not use synonyms.- Returns:
- A new
TextSearchOperator
.
-
fuzzy
Creates a newTextSearchOperator
that uses fuzzy search and does not use synonyms.- Parameters:
options
- The fuzzy search options. SpecifyingFuzzySearchOptions.fuzzySearchOptions()
is equivalent to callingfuzzy()
.- Returns:
- A new
TextSearchOperator
.
-
synonyms
Creates a newTextSearchOperator
that uses synonyms and does not use fuzzy search.- Parameters:
name
- The name of the synonym mapping.- Returns:
- A new
TextSearchOperator
. - MongoDB Atlas documentation
- Synonym mappings
-