Skip to main content

query_suggestions

Creates, updates, deletes, gets or lists a query_suggestions resource.

Overview

Namequery_suggestions
TypeResource
Idaws.kendra.query_suggestions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
query_suggestions_idstringThe identifier for a list of query suggestions for an index.
suggestionsarrayA list of query suggestions for an index.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_query_suggestionsselectregionFetches the queries that are suggested to your users. GetQuerySuggestions is currently not supported in the Amazon Web Services GovCloud (US-West) region.
clear_query_suggestionsexecregion, IndexIdClears existing query suggestions from an index. This deletes existing suggestions only, not the queries in the query log. After you clear suggestions, Amazon Kendra learns new suggestions based on new queries added to the query log from the time you cleared suggestions. If you do not see any new suggestions, then please allow Amazon Kendra to collect enough queries to learn new suggestions. ClearQuerySuggestions is currently not supported in the Amazon Web Services GovCloud (US-West) region.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Fetches the queries that are suggested to your users. GetQuerySuggestions is currently not supported in the Amazon Web Services GovCloud (US-West) region.

SELECT
query_suggestions_id,
suggestions
FROM aws.kendra.query_suggestions
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

Clears existing query suggestions from an index. This deletes existing suggestions only, not the queries in the query log. After you clear suggestions, Amazon Kendra learns new suggestions based on new queries added to the query log from the time you cleared suggestions. If you do not see any new suggestions, then please allow Amazon Kendra to collect enough queries to learn new suggestions. ClearQuerySuggestions is currently not supported in the Amazon Web Services GovCloud (US-West) region.

EXEC aws.kendra.query_suggestions.clear_query_suggestions
@region='{{ region }}' --required
@@json=
'{
"IndexId": "{{ IndexId }}"
}'
;