Click or drag to resize

SearchDefinitionBuilder<TDocument>.Autocomplete<TField> Method (Expression<Func<TDocument, TField>>, SearchQueryDefinition, SearchAutocompleteTokenOrder, SearchFuzzyOptions, SearchScoreDefinition<TDocument>)

Creates a search definition that performs a search for a word or phrase that contains a sequence of characters from an incomplete search string.

Namespace:  MongoDB.Driver.Search
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public SearchDefinition<TDocument> Autocomplete<TField>(
	Expression<Func<TDocument, TField>> path,
	SearchQueryDefinition query,
	SearchAutocompleteTokenOrder tokenOrder = SearchAutocompleteTokenOrder.Any,
	SearchFuzzyOptions fuzzy = null,
	SearchScoreDefinition<TDocument> score = null
)

Parameters

path
Type: System.Linq.Expressions.Expression<Func<TDocument, TField>>
The indexed field to search.
query
Type: MongoDB.Driver.Search.SearchQueryDefinition
The query definition specifying the string or strings to search for.
tokenOrder (Optional)
Type: MongoDB.Driver.Search.SearchAutocompleteTokenOrder
The order in which to search for tokens.
fuzzy (Optional)
Type: MongoDB.Driver.Search.SearchFuzzyOptions
The options for fuzzy search.
score (Optional)
Type: MongoDB.Driver.Search.SearchScoreDefinition<TDocument>
The score modifier.

Type Parameters

TField
The type of the field.

Return Value

Type: SearchDefinition<TDocument>
An autocomplete search definition.
See Also