AWSKendraFrontendService

2023/05/02 - AWSKendraFrontendService - 3 updated api methods

Changes  AWS Kendra now supports configuring document fields/attributes via the GetQuerySuggestions API. You can now base query suggestions on the contents of document fields.

DescribeQuerySuggestionsConfig (updated) Link ¶
Changes (response)
{'AttributeSuggestionsConfig': {'AttributeSuggestionsMode': 'ACTIVE | INACTIVE',
                                'SuggestableConfigList': [{'AttributeName': 'string',
                                                           'Suggestable': 'boolean'}]}}

Gets information on the settings of query suggestions for an index.

This is used to check the current settings applied to query suggestions.

DescribeQuerySuggestionsConfig is currently not supported in the Amazon Web Services GovCloud (US-West) region.

See also: AWS API Documentation

Request Syntax

client.describe_query_suggestions_config(
    IndexId='string'
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index with query suggestions that you want to get information on.

rtype

dict

returns

Response Syntax

{
    'Mode': 'ENABLED'|'LEARN_ONLY',
    'Status': 'ACTIVE'|'UPDATING',
    'QueryLogLookBackWindowInDays': 123,
    'IncludeQueriesWithoutUserInformation': True|False,
    'MinimumNumberOfQueryingUsers': 123,
    'MinimumQueryCount': 123,
    'LastSuggestionsBuildTime': datetime(2015, 1, 1),
    'LastClearTime': datetime(2015, 1, 1),
    'TotalSuggestionsCount': 123,
    'AttributeSuggestionsConfig': {
        'SuggestableConfigList': [
            {
                'AttributeName': 'string',
                'Suggestable': True|False
            },
        ],
        'AttributeSuggestionsMode': 'ACTIVE'|'INACTIVE'
    }
}

Response Structure

  • (dict) --

    • Mode (string) --

      Whether query suggestions are currently in ENABLED mode or LEARN_ONLY mode.

      By default, Amazon Kendra enables query suggestions. LEARN_ONLY turns off query suggestions for your users. You can change the mode using the UpdateQuerySuggestionsConfig API.

    • Status (string) --

      Whether the status of query suggestions settings is currently ACTIVE or UPDATING .

      Active means the current settings apply and Updating means your changed settings are in the process of applying.

    • QueryLogLookBackWindowInDays (integer) --

      How recent your queries are in your query log time window (in days).

    • IncludeQueriesWithoutUserInformation (boolean) --

      TRUE to use all queries, otherwise use only queries that include user information to generate the query suggestions.

    • MinimumNumberOfQueryingUsers (integer) --

      The minimum number of unique users who must search a query in order for the query to be eligible to suggest to your users.

    • MinimumQueryCount (integer) --

      The minimum number of times a query must be searched in order for the query to be eligible to suggest to your users.

    • LastSuggestionsBuildTime (datetime) --

      The Unix timestamp when query suggestions for an index was last updated.

      Amazon Kendra automatically updates suggestions every 24 hours, after you change a setting or after you apply a block list.

    • LastClearTime (datetime) --

      The Unix timestamp when query suggestions for an index was last cleared.

      After you clear suggestions, Amazon Kendra learns new suggestions based on new queries added to the query log from the time you cleared suggestions. Amazon Kendra only considers re-occurences of a query from the time you cleared suggestions.

    • TotalSuggestionsCount (integer) --

      The current total count of query suggestions for an index.

      This count can change when you update your query suggestions settings, if you filter out certain queries from suggestions using a block list, and as the query log accumulates more queries for Amazon Kendra to learn from.

      If the count is much lower than you expected, it could be because Amazon Kendra needs more queries in the query history to learn from or your current query suggestions settings are too strict.

    • AttributeSuggestionsConfig (dict) --

      Configuration information for the document fields/attributes that you want to base query suggestions on.

      • SuggestableConfigList (list) --

        The list of fields/attributes that you want to set as suggestible for query suggestions.

        • (dict) --

          Provides the configuration information for a document field/attribute that you want to base query suggestions on.

          • AttributeName (string) --

            The name of the document field/attribute.

          • Suggestable (boolean) --

            TRUE means the document field/attribute is suggestible, so the contents within the field can be used for query suggestions.

      • AttributeSuggestionsMode (string) --

        The mode is set to either ACTIVE or INACTIVE . If the Mode for query history is set to ENABLED when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode to use fields/attributes is set to ACTIVE , and you haven't set your SuggestionTypes preference to DOCUMENT_ATTRIBUTES , then Amazon Kendra uses the query history.

GetQuerySuggestions (updated) Link ¶
Changes (request, response)
Request
{'AttributeSuggestionsConfig': {'AdditionalResponseAttributes': ['string'],
                                'AttributeFilter': {'AndAllFilters': [()],
                                                    'ContainsAll': {'Key': 'string',
                                                                    'Value': {'DateValue': 'timestamp',
                                                                              'LongValue': 'long',
                                                                              'StringListValue': ['string'],
                                                                              'StringValue': 'string'}},
                                                    'ContainsAny': {'Key': 'string',
                                                                    'Value': {'DateValue': 'timestamp',
                                                                              'LongValue': 'long',
                                                                              'StringListValue': ['string'],
                                                                              'StringValue': 'string'}},
                                                    'EqualsTo': {'Key': 'string',
                                                                 'Value': {'DateValue': 'timestamp',
                                                                           'LongValue': 'long',
                                                                           'StringListValue': ['string'],
                                                                           'StringValue': 'string'}},
                                                    'GreaterThan': {'Key': 'string',
                                                                    'Value': {'DateValue': 'timestamp',
                                                                              'LongValue': 'long',
                                                                              'StringListValue': ['string'],
                                                                              'StringValue': 'string'}},
                                                    'GreaterThanOrEquals': {'Key': 'string',
                                                                            'Value': {'DateValue': 'timestamp',
                                                                                      'LongValue': 'long',
                                                                                      'StringListValue': ['string'],
                                                                                      'StringValue': 'string'}},
                                                    'LessThan': {'Key': 'string',
                                                                 'Value': {'DateValue': 'timestamp',
                                                                           'LongValue': 'long',
                                                                           'StringListValue': ['string'],
                                                                           'StringValue': 'string'}},
                                                    'LessThanOrEquals': {'Key': 'string',
                                                                         'Value': {'DateValue': 'timestamp',
                                                                                   'LongValue': 'long',
                                                                                   'StringListValue': ['string'],
                                                                                   'StringValue': 'string'}},
                                                    'NotFilter': (),
                                                    'OrAllFilters': [()]},
                                'SuggestionAttributes': ['string'],
                                'UserContext': {'DataSourceGroups': [{'DataSourceId': 'string',
                                                                      'GroupId': 'string'}],
                                                'Groups': ['string'],
                                                'Token': 'string',
                                                'UserId': 'string'}},
 'SuggestionTypes': ['QUERY | DOCUMENT_ATTRIBUTES']}
Response
{'Suggestions': {'SourceDocuments': [{'AdditionalAttributes': [{'Key': 'string',
                                                                'Value': {'DateValue': 'timestamp',
                                                                          'LongValue': 'long',
                                                                          'StringListValue': ['string'],
                                                                          'StringValue': 'string'}}],
                                      'DocumentId': 'string',
                                      'SuggestionAttributes': ['string']}]}}

Fetches the queries that are suggested to your users.

GetQuerySuggestions is currently not supported in the Amazon Web Services GovCloud (US-West) region.

See also: AWS API Documentation

Request Syntax

client.get_query_suggestions(
    IndexId='string',
    QueryText='string',
    MaxSuggestionsCount=123,
    SuggestionTypes=[
        'QUERY'|'DOCUMENT_ATTRIBUTES',
    ],
    AttributeSuggestionsConfig={
        'SuggestionAttributes': [
            'string',
        ],
        'AdditionalResponseAttributes': [
            'string',
        ],
        'AttributeFilter': {
            'AndAllFilters': [
                {'... recursive ...'},
            ],
            'OrAllFilters': [
                {'... recursive ...'},
            ],
            'NotFilter': {'... recursive ...'},
            'EqualsTo': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            },
            'ContainsAll': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            },
            'ContainsAny': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            },
            'GreaterThan': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            },
            'GreaterThanOrEquals': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            },
            'LessThan': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            },
            'LessThanOrEquals': {
                'Key': 'string',
                'Value': {
                    'StringValue': 'string',
                    'StringListValue': [
                        'string',
                    ],
                    'LongValue': 123,
                    'DateValue': datetime(2015, 1, 1)
                }
            }
        },
        'UserContext': {
            'Token': 'string',
            'UserId': 'string',
            'Groups': [
                'string',
            ],
            'DataSourceGroups': [
                {
                    'GroupId': 'string',
                    'DataSourceId': 'string'
                },
            ]
        }
    }
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index you want to get query suggestions from.

type QueryText

string

param QueryText

[REQUIRED]

The text of a user's query to generate query suggestions.

A query is suggested if the query prefix matches what a user starts to type as their query.

Amazon Kendra does not show any suggestions if a user types fewer than two characters or more than 60 characters. A query must also have at least one search result and contain at least one word of more than four characters.

type MaxSuggestionsCount

integer

param MaxSuggestionsCount

The maximum number of query suggestions you want to show to your users.

type SuggestionTypes

list

param SuggestionTypes

The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

  • (string) --

type AttributeSuggestionsConfig

dict

param AttributeSuggestionsConfig

Configuration information for the document fields/attributes that you want to base query suggestions on.

  • SuggestionAttributes (list) --

    The list of document field/attribute keys or field names to use for query suggestions. If the content within any of the fields match what your user starts typing as their query, then the field content is returned as a query suggestion.

    • (string) --

  • AdditionalResponseAttributes (list) --

    The list of additional document field/attribute keys or field names to include in the response. You can use additional fields to provide extra information in the response. Additional fields are not used to based suggestions on.

    • (string) --

  • AttributeFilter (dict) --

    Filters the search results based on document fields/attributes.

    • AndAllFilters (list) --

      Performs a logical AND operation on all supplied filters.

      • (dict) --

        Provides filtering the query results based on document attributes or metadata fields.

        When you use the AndAllFilters or OrAllFilters , filters you can use 2 layers under the first attribute filter. For example, you can use:

        <AndAllFilters>

        • <OrAllFilters>

        • <EqualsTo>

        If you use more than 2 layers, you receive a ValidationException exception with the message " AttributeFilter cannot have a depth of more than 2."

        If you use more than 10 attribute filters in a given list for AndAllFilters or OrAllFilters , you receive a ValidationException with the message " AttributeFilter cannot have a length of more than 10".

    • OrAllFilters (list) --

      Performs a logical OR operation on all supplied filters.

      • (dict) --

        Provides filtering the query results based on document attributes or metadata fields.

        When you use the AndAllFilters or OrAllFilters , filters you can use 2 layers under the first attribute filter. For example, you can use:

        <AndAllFilters>

        • <OrAllFilters>

        • <EqualsTo>

        If you use more than 2 layers, you receive a ValidationException exception with the message " AttributeFilter cannot have a depth of more than 2."

        If you use more than 10 attribute filters in a given list for AndAllFilters or OrAllFilters , you receive a ValidationException with the message " AttributeFilter cannot have a length of more than 10".

    • NotFilter (dict) --

      Performs a logical NOT operation on all supplied filters.

    • EqualsTo (dict) --

      Performs an equals operation on two document attributes or metadata fields.

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

    • ContainsAll (dict) --

      Returns true when a document contains all of the specified document attributes or metadata fields. This filter is only applicable to StringListValue metadata.

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

    • ContainsAny (dict) --

      Returns true when a document contains any of the specified document attributes or metadata fields. This filter is only applicable to StringListValue metadata.

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

    • GreaterThan (dict) --

      Performs a greater than operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long .

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

    • GreaterThanOrEquals (dict) --

      Performs a greater or equals than operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long .

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

    • LessThan (dict) --

      Performs a less than operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long .

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

    • LessThanOrEquals (dict) --

      Performs a less than or equals operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long .

      • Key (string) -- [REQUIRED]

        The identifier for the attribute.

      • Value (dict) -- [REQUIRED]

        The value of the attribute.

        • StringValue (string) --

          A string, such as "department".

        • StringListValue (list) --

          A list of strings. The default maximum length or number of strings is 10.

          • (string) --

        • LongValue (integer) --

          A long integer value.

        • DateValue (datetime) --

          A date expressed as an ISO 8601 string.

          It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

  • UserContext (dict) --

    Applies user context filtering so that only users who are given access to certain documents see these document in their search results.

    • Token (string) --

      The user context token for filtering search results for a user. It must be a JWT or a JSON token.

    • UserId (string) --

      The identifier of the user you want to filter search results based on their access to documents.

    • Groups (list) --

      The list of groups you want to filter search results based on the groups' access to documents.

      • (string) --

    • DataSourceGroups (list) --

      The list of data source groups you want to filter search results based on groups' access to documents in that data source.

      • (dict) --

        Data source information for user context filtering.

        • GroupId (string) -- [REQUIRED]

          The identifier of the group you want to add to your list of groups. This is for filtering search results based on the groups' access to documents.

        • DataSourceId (string) -- [REQUIRED]

          The identifier of the data source group you want to add to your list of data source groups. This is for filtering search results based on the groups' access to documents in that data source.

rtype

dict

returns

Response Syntax

{
    'QuerySuggestionsId': 'string',
    'Suggestions': [
        {
            'Id': 'string',
            'Value': {
                'Text': {
                    'Text': 'string',
                    'Highlights': [
                        {
                            'BeginOffset': 123,
                            'EndOffset': 123
                        },
                    ]
                }
            },
            'SourceDocuments': [
                {
                    'DocumentId': 'string',
                    'SuggestionAttributes': [
                        'string',
                    ],
                    'AdditionalAttributes': [
                        {
                            'Key': 'string',
                            'Value': {
                                'StringValue': 'string',
                                'StringListValue': [
                                    'string',
                                ],
                                'LongValue': 123,
                                'DateValue': datetime(2015, 1, 1)
                            }
                        },
                    ]
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • QuerySuggestionsId (string) --

      The identifier for a list of query suggestions for an index.

    • Suggestions (list) --

      A list of query suggestions for an index.

      • (dict) --

        A single query suggestion.

        • Id (string) --

          The UUID (universally unique identifier) of a single query suggestion.

        • Value (dict) --

          The value for the UUID (universally unique identifier) of a single query suggestion.

          The value is the text string of a suggestion.

          • Text (dict) --

            The SuggestionTextWithHighlights structure that contains the query suggestion text and highlights.

            • Text (string) --

              The query suggestion text to display to the user.

            • Highlights (list) --

              The beginning and end of the query suggestion text that should be highlighted.

              • (dict) --

                The text highlights for a single query suggestion.

                • BeginOffset (integer) --

                  The zero-based location in the response string where the highlight starts.

                • EndOffset (integer) --

                  The zero-based location in the response string where the highlight ends.

        • SourceDocuments (list) --

          The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.

          • (dict) --

            The document ID and its fields/attributes that are used for a query suggestion, if document fields set to use for query suggestions.

            • DocumentId (string) --

              The identifier of the document used for a query suggestion.

            • SuggestionAttributes (list) --

              The document fields/attributes used for a query suggestion.

              • (string) --

            • AdditionalAttributes (list) --

              The additional fields/attributes to include in the response. You can use additional fields to provide extra information in the response. Additional fields are not used to based suggestions on.

              • (dict) --

                A document attribute or metadata field. To create custom document attributes, see Custom attributes.

                • Key (string) --

                  The identifier for the attribute.

                • Value (dict) --

                  The value of the attribute.

                  • StringValue (string) --

                    A string, such as "department".

                  • StringListValue (list) --

                    A list of strings. The default maximum length or number of strings is 10.

                    • (string) --

                  • LongValue (integer) --

                    A long integer value.

                  • DateValue (datetime) --

                    A date expressed as an ISO 8601 string.

                    It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

UpdateQuerySuggestionsConfig (updated) Link ¶
Changes (request)
{'AttributeSuggestionsConfig': {'AttributeSuggestionsMode': 'ACTIVE | INACTIVE',
                                'SuggestableConfigList': [{'AttributeName': 'string',
                                                           'Suggestable': 'boolean'}]}}

Updates the settings of query suggestions for an index.

Amazon Kendra supports partial updates, so you only need to provide the fields you want to update.

If an update is currently processing, you need to wait for the update to finish before making another update.

Updates to query suggestions settings might not take effect right away. The time for your updated settings to take effect depends on the updates made and the number of search queries in your index.

You can still enable/disable query suggestions at any time.

UpdateQuerySuggestionsConfig is currently not supported in the Amazon Web Services GovCloud (US-West) region.

See also: AWS API Documentation

Request Syntax

client.update_query_suggestions_config(
    IndexId='string',
    Mode='ENABLED'|'LEARN_ONLY',
    QueryLogLookBackWindowInDays=123,
    IncludeQueriesWithoutUserInformation=True|False,
    MinimumNumberOfQueryingUsers=123,
    MinimumQueryCount=123,
    AttributeSuggestionsConfig={
        'SuggestableConfigList': [
            {
                'AttributeName': 'string',
                'Suggestable': True|False
            },
        ],
        'AttributeSuggestionsMode': 'ACTIVE'|'INACTIVE'
    }
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index with query suggestions you want to update.

type Mode

string

param Mode

Set the mode to ENABLED or LEARN_ONLY .

By default, Amazon Kendra enables query suggestions. LEARN_ONLY mode allows you to turn off query suggestions. You can to update this at any time.

In LEARN_ONLY mode, Amazon Kendra continues to learn from new queries to keep suggestions up to date for when you are ready to switch to ENABLED mode again.

type QueryLogLookBackWindowInDays

integer

param QueryLogLookBackWindowInDays

How recent your queries are in your query log time window.

The time window is the number of days from current day to past days.

By default, Amazon Kendra sets this to 180.

type IncludeQueriesWithoutUserInformation

boolean

param IncludeQueriesWithoutUserInformation

TRUE to include queries without user information (i.e. all queries, irrespective of the user), otherwise FALSE to only include queries with user information.

If you pass user information to Amazon Kendra along with the queries, you can set this flag to FALSE and instruct Amazon Kendra to only consider queries with user information.

If you set to FALSE , Amazon Kendra only considers queries searched at least MinimumQueryCount times across MinimumNumberOfQueryingUsers unique users for suggestions.

If you set to TRUE , Amazon Kendra ignores all user information and learns from all queries.

type MinimumNumberOfQueryingUsers

integer

param MinimumNumberOfQueryingUsers

The minimum number of unique users who must search a query in order for the query to be eligible to suggest to your users.

Increasing this number might decrease the number of suggestions. However, this ensures a query is searched by many users and is truly popular to suggest to users.

How you tune this setting depends on your specific needs.

type MinimumQueryCount

integer

param MinimumQueryCount

The the minimum number of times a query must be searched in order to be eligible to suggest to your users.

Decreasing this number increases the number of suggestions. However, this affects the quality of suggestions as it sets a low bar for a query to be considered popular to suggest to users.

How you tune this setting depends on your specific needs.

type AttributeSuggestionsConfig

dict

param AttributeSuggestionsConfig

Configuration information for the document fields/attributes that you want to base query suggestions on.

  • SuggestableConfigList (list) --

    The list of fields/attributes that you want to set as suggestible for query suggestions.

    • (dict) --

      Provides the configuration information for a document field/attribute that you want to base query suggestions on.

      • AttributeName (string) --

        The name of the document field/attribute.

      • Suggestable (boolean) --

        TRUE means the document field/attribute is suggestible, so the contents within the field can be used for query suggestions.

  • AttributeSuggestionsMode (string) --

    You can set the mode to ACTIVE or INACTIVE . You must also set SuggestionTypes as either QUERY or DOCUMENT_ATTRIBUTES and then call GetQuerySuggestions. If Mode to use query history is set to ENABLED when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode to use fields/attributes is set to ACTIVE , and you haven't set your SuggestionTypes preference to DOCUMENT_ATTRIBUTES , then Amazon Kendra uses the query history.

returns

None