Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AutocompleteOptions<Fields>

Package version

Parameter group Options for retrieving completion text for a partial searchText.

Type parameters

  • Fields

Hierarchy

  • AutocompleteOptions

Index

Properties

Optional autocompleteMode

autocompleteMode: AutocompleteMode

Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms.

Optional filter

filter: undefined | string

An OData expression that filters the documents used to produce completed terms for the Autocomplete result.

Optional highlightPostTag

highlightPostTag: undefined | string

A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled.

Optional highlightPreTag

highlightPreTag: undefined | string

A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled.

Optional minimumCoverage

minimumCoverage: undefined | number

A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.

Optional searchFields

searchFields: string[]

The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester.

Optional top

top: undefined | number

The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5.

Optional useFuzzyMatching

useFuzzyMatching: undefined | false | true

A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources.

Generated using TypeDoc