SearchDefinitionBuilderTDocumentAutocomplete Method (SearchPathDefinitionTDocument, SearchQueryDefinition, SearchAutocompleteTokenOrder, SearchFuzzyOptions, SearchScoreDefinitionTDocument) |
Creates a search definition that performs a search for a word or phrase that contains
a sequence of characters from an incomplete input string.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public SearchDefinition<TDocument> Autocomplete(
SearchPathDefinition<TDocument> path,
SearchQueryDefinition query,
SearchAutocompleteTokenOrder tokenOrder = SearchAutocompleteTokenOrder.Any,
SearchFuzzyOptions fuzzy = null,
SearchScoreDefinition<TDocument> score = null
)
Public Function Autocomplete (
path As SearchPathDefinition(Of TDocument),
query As SearchQueryDefinition,
Optional tokenOrder As SearchAutocompleteTokenOrder = SearchAutocompleteTokenOrder.Any,
Optional fuzzy As SearchFuzzyOptions = Nothing,
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member Autocomplete :
path : SearchPathDefinition<'TDocument> *
query : SearchQueryDefinition *
?tokenOrder : SearchAutocompleteTokenOrder *
?fuzzy : SearchFuzzyOptions *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _tokenOrder = defaultArg tokenOrder SearchAutocompleteTokenOrder.Any
let _fuzzy = defaultArg fuzzy null
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument>
Parameters
- path
- Type: MongoDB.Driver.SearchSearchPathDefinitionTDocument
The indexed field to search. - query
- Type: MongoDB.Driver.SearchSearchQueryDefinition
The query definition specifying the string or strings to search for. - tokenOrder (Optional)
- Type: MongoDB.Driver.SearchSearchAutocompleteTokenOrder
The order in which to search for tokens. - fuzzy (Optional)
- Type: MongoDB.Driver.SearchSearchFuzzyOptions
The options for fuzzy search. - score (Optional)
- Type: MongoDB.Driver.SearchSearchScoreDefinitionTDocument
The score modifier.
Return Value
Type:
SearchDefinitionTDocumentAn autocomplete search definition.
See Also