younifyd
Menu

Documents Autocomplete Post

Autocompletes incomplete query terms based on input text and matching terms in the index.

POST/indexes('{indexName}')/docs/search.post.autocomplete

Use it in a workflow

  1. Add a step and choose the Azure AI Search connector.
  2. Pick the Documents Autocomplete Post action (under Documents).
  3. Fill in the fields below, then reference the result from later steps as {{documentsAutocompletePost.response.data}}.

Request

Path parameters

indexNamestringrequired

The name of the index.

Request body

Enter the body as JSON in the step's Body field.

searchstringrequired

The search text on which to base autocomplete results.

autocompleteModestring

Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context in producing autocomplete terms.

One ofoneTermtwoTermsoneTermWithContext

filterstring

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

fuzzyboolean

A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will autocomplete 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.

highlightPostTagstring

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

highlightPreTagstring

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

minimumCoveragenumber (double)

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.

searchFieldsstring

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

suggesterNamestringrequired

The name of the suggester as specified in the suggesters collection that's part of the index definition.

topinteger (int32)

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

json
{
  "search": "string",
  "suggesterName": "string",
  "autocompleteMode": "oneTerm",
  "filter": "string",
  "fuzzy": false,
  "highlightPostTag": "string",
  "highlightPreTag": "string",
  "minimumCoverage": 0,
  "searchFields": "string",
  "top": 0
}

Response

Returns 200 with a any. Read it in later steps with {{documentsAutocompletePost.response.data.<field>}}.

Need more? See the Azure AI Search guide for connection setup and behaviour shared by every action.