Class CompletionSuggesterDescriptor<T>
The completion suggester provides auto-complete/search-as-you-type functionality.
This is a navigational feature to guide users to relevant results as they are typing, improving search precision.
It is not meant for spell correction or did-you-mean functionality like the term or phrase suggesters.
Inheritance
CompletionSuggesterDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class CompletionSuggesterDescriptor<T> : SuggestDescriptorBase<CompletionSuggesterDescriptor<T>, ICompletionSuggester, T>, IDescriptor, ICompletionSuggester, ISuggester where T : class
Type Parameters
Methods
|
Edit this page
View Source
Contexts(Func<SuggestContextQueriesDescriptor<T>, IPromise<IDictionary<string, IList<ISuggestContextQuery>>>>)
Context mappings used to filter and/or boost suggestions
Declaration
public CompletionSuggesterDescriptor<T> Contexts(Func<SuggestContextQueriesDescriptor<T>, IPromise<IDictionary<string, IList<ISuggestContextQuery>>>> contexts)
Parameters
Returns
|
Edit this page
View Source
Fuzzy(Func<SuggestFuzzinessDescriptor<T>, ISuggestFuzziness>)
Support fuzziness for the suggestions
Declaration
public CompletionSuggesterDescriptor<T> Fuzzy(Func<SuggestFuzzinessDescriptor<T>, ISuggestFuzziness> selector = null)
Parameters
Returns
|
Edit this page
View Source
Prefix(string)
Prefix used to search for suggestions
Declaration
public CompletionSuggesterDescriptor<T> Prefix(string prefix)
Parameters
Type |
Name |
Description |
string |
prefix |
|
Returns
|
Edit this page
View Source
Regex(string)
Prefix as a regular expression used to search for suggestions
Declaration
public CompletionSuggesterDescriptor<T> Regex(string regex)
Parameters
Type |
Name |
Description |
string |
regex |
|
Returns
|
Edit this page
View Source
SkipDuplicates(bool?)
Whether duplicate suggestions should be filtered out. Defaults to false
Declaration
public CompletionSuggesterDescriptor<T> SkipDuplicates(bool? skipDuplicates = true)
Parameters
Type |
Name |
Description |
bool? |
skipDuplicates |
|
Returns
Implements
Extension Methods