AWSKendraFrontendService

2023/03/30 - AWSKendraFrontendService - 5 new 1 updated api methods

Changes  AWS Kendra now supports featured results for a query.

UpdateFeaturedResultsSet (new) Link ¶

Updates a set of featured results. Features results are placed above all other results for certain queries. You map specific queries to specific documents for featuring in the results. If a query contains an exact match of a query, then one or more specific documents are featured in the search results.

See also: AWS API Documentation

Request Syntax

client.update_featured_results_set(
    IndexId='string',
    FeaturedResultsSetId='string',
    FeaturedResultsSetName='string',
    Description='string',
    Status='ACTIVE'|'INACTIVE',
    QueryTexts=[
        'string',
    ],
    FeaturedDocuments=[
        {
            'Id': 'string'
        },
    ]
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index used for featuring results.

type FeaturedResultsSetId

string

param FeaturedResultsSetId

[REQUIRED]

The identifier of the index used for featuring results.

type FeaturedResultsSetName

string

param FeaturedResultsSetName

A new name for the set of featured results.

type Description

string

param Description

A new description for the set of featured results.

type Status

string

param Status

You can set the status to ACTIVE or INACTIVE . When the value is ACTIVE , featured results are ready for use. You can still configure your settings before setting the status to ACTIVE . The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE .

type QueryTexts

list

param QueryTexts

A list of queries for featuring results. For more information on the list of queries, see FeaturedResultsSet.

  • (string) --

type FeaturedDocuments

list

param FeaturedDocuments

A list of document IDs for the documents you want to feature at the top of the search results page. For more information on the list of featured documents, see FeaturedResultsSet.

  • (dict) --

    A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

    • Id (string) --

      The identifier of the document to feature in the search results. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

rtype

dict

returns

Response Syntax

{
    'FeaturedResultsSet': {
        'FeaturedResultsSetId': 'string',
        'FeaturedResultsSetName': 'string',
        'Description': 'string',
        'Status': 'ACTIVE'|'INACTIVE',
        'QueryTexts': [
            'string',
        ],
        'FeaturedDocuments': [
            {
                'Id': 'string'
            },
        ],
        'LastUpdatedTimestamp': 123,
        'CreationTimestamp': 123
    }
}

Response Structure

  • (dict) --

    • FeaturedResultsSet (dict) --

      Information on the set of featured results. This includes the identifier of the featured results set, whether the featured results set is active or inactive, when the featured results set was last updated, and more.

      • FeaturedResultsSetId (string) --

        The identifier of the set of featured results.

      • FeaturedResultsSetName (string) --

        The name for the set of featured results.

      • Description (string) --

        The description for the set of featured results.

      • Status (string) --

        The current status of the set of featured results. When the value is ACTIVE , featured results are ready for use. You can still configure your settings before setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE .

      • QueryTexts (list) --

        The list of queries for featuring results.

        Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify 'Kendra', queries such as 'How does kendra semantically rank results?' will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.

        • (string) --

      • FeaturedDocuments (list) --

        The list of document IDs for the documents you want to feature at the top of the search results page. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

        You can add up to four featured documents. You can request to increase this limit by contacting Support.

        Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify 'Kendra', queries such as 'How does kendra semantically rank results?' will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.

        • (dict) --

          A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

          • Id (string) --

            The identifier of the document to feature in the search results. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

      • LastUpdatedTimestamp (integer) --

        The Unix timestamp when the set of featured results was last updated.

      • CreationTimestamp (integer) --

        The Unix timestamp when the set of featured results was created.

BatchDeleteFeaturedResultsSet (new) Link ¶

Removes one or more sets of featured results. Features results are placed above all other results for certain queries. If there's an exact match of a query, then one or more specific documents are featured in the search results.

See also: AWS API Documentation

Request Syntax

client.batch_delete_featured_results_set(
    IndexId='string',
    FeaturedResultsSetIds=[
        'string',
    ]
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index used for featuring results.

type FeaturedResultsSetIds

list

param FeaturedResultsSetIds

[REQUIRED]

The identifiers of the featured results sets that you want to delete.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Errors': [
        {
            'Id': 'string',
            'ErrorCode': 'InternalError'|'InvalidRequest',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Errors (list) --

      The list of errors for the featured results set IDs, explaining why they couldn't be removed from the index.

      • (dict) --

        Provides information about a set of featured results that couldn't be removed from an index by the BatchDeleteFeaturedResultsSet API.

        • Id (string) --

          The identifier of the set of featured results that couldn't be removed from the index.

        • ErrorCode (string) --

          The error code for why the set of featured results couldn't be removed from the index.

        • ErrorMessage (string) --

          An explanation for why the set of featured results couldn't be removed from the index.

CreateFeaturedResultsSet (new) Link ¶

Creates a set of featured results to display at the top of the search results page. Featured results are placed above all other results for certain queries. You map specific queries to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the search results.

You can create up to 50 sets of featured results per index. You can request to increase this limit by contacting Support.

See also: AWS API Documentation

Request Syntax

client.create_featured_results_set(
    IndexId='string',
    FeaturedResultsSetName='string',
    Description='string',
    ClientToken='string',
    Status='ACTIVE'|'INACTIVE',
    QueryTexts=[
        'string',
    ],
    FeaturedDocuments=[
        {
            'Id': 'string'
        },
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index that you want to use for featuring results.

type FeaturedResultsSetName

string

param FeaturedResultsSetName

[REQUIRED]

A name for the set of featured results.

type Description

string

param Description

A description for the set of featured results.

type ClientToken

string

param ClientToken

A token that you provide to identify the request to create a set of featured results. Multiple calls to the CreateFeaturedResultsSet API with the same client token will create only one featured results set.

type Status

string

param Status

The current status of the set of featured results. When the value is ACTIVE , featured results are ready for use. You can still configure your settings before setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE .

type QueryTexts

list

param QueryTexts

A list of queries for featuring results. For more information on the list of queries, see FeaturedResultsSet.

  • (string) --

type FeaturedDocuments

list

param FeaturedDocuments

A list of document IDs for the documents you want to feature at the top of the search results page. For more information on the list of documents, see FeaturedResultsSet.

  • (dict) --

    A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

    • Id (string) --

      The identifier of the document to feature in the search results. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

type Tags

list

param Tags

A list of key-value pairs that identify or categorize the featured results set. You can also use tags to help control access to the featured results set. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols:_ . : / = + - @.

  • (dict) --

    A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

    • Key (string) -- [REQUIRED]

      The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, or data source.

    • Value (string) -- [REQUIRED]

      The value associated with the tag. The value may be an empty string but it can't be null.

rtype

dict

returns

Response Syntax

{
    'FeaturedResultsSet': {
        'FeaturedResultsSetId': 'string',
        'FeaturedResultsSetName': 'string',
        'Description': 'string',
        'Status': 'ACTIVE'|'INACTIVE',
        'QueryTexts': [
            'string',
        ],
        'FeaturedDocuments': [
            {
                'Id': 'string'
            },
        ],
        'LastUpdatedTimestamp': 123,
        'CreationTimestamp': 123
    }
}

Response Structure

  • (dict) --

    • FeaturedResultsSet (dict) --

      Information on the set of featured results. This includes the identifier of the featured results set, whether the featured results set is active or inactive, when the featured results set was created, and more.

      • FeaturedResultsSetId (string) --

        The identifier of the set of featured results.

      • FeaturedResultsSetName (string) --

        The name for the set of featured results.

      • Description (string) --

        The description for the set of featured results.

      • Status (string) --

        The current status of the set of featured results. When the value is ACTIVE , featured results are ready for use. You can still configure your settings before setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE .

      • QueryTexts (list) --

        The list of queries for featuring results.

        Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify 'Kendra', queries such as 'How does kendra semantically rank results?' will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.

        • (string) --

      • FeaturedDocuments (list) --

        The list of document IDs for the documents you want to feature at the top of the search results page. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

        You can add up to four featured documents. You can request to increase this limit by contacting Support.

        Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify 'Kendra', queries such as 'How does kendra semantically rank results?' will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.

        • (dict) --

          A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

          • Id (string) --

            The identifier of the document to feature in the search results. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

      • LastUpdatedTimestamp (integer) --

        The Unix timestamp when the set of featured results was last updated.

      • CreationTimestamp (integer) --

        The Unix timestamp when the set of featured results was created.

ListFeaturedResultsSets (new) Link ¶

Lists all your sets of featured results for a given index. Features results are placed above all other results for certain queries. If there's an exact match of a query, then one or more specific documents are featured in the search results.

See also: AWS API Documentation

Request Syntax

client.list_featured_results_sets(
    IndexId='string',
    NextToken='string',
    MaxResults=123
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index used for featuring results.

type NextToken

string

param NextToken

If the response is truncated, Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of featured results sets.

type MaxResults

integer

param MaxResults

The maximum number of featured results sets to return.

rtype

dict

returns

Response Syntax

{
    'FeaturedResultsSetSummaryItems': [
        {
            'FeaturedResultsSetId': 'string',
            'FeaturedResultsSetName': 'string',
            'Status': 'ACTIVE'|'INACTIVE',
            'LastUpdatedTimestamp': 123,
            'CreationTimestamp': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FeaturedResultsSetSummaryItems (list) --

      An array of summary information for one or more featured results sets.

      • (dict) --

        Summary information for a set of featured results. Featured results are placed above all other results for certain queries. If there's an exact match of a query, then one or more specific documents are featured in the search results.

        • FeaturedResultsSetId (string) --

          The identifier of the set of featured results.

        • FeaturedResultsSetName (string) --

          The name for the set of featured results.

        • Status (string) --

          The current status of the set of featured results. When the value is ACTIVE , featured results are ready for use. You can still configure your settings before setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE .

        • LastUpdatedTimestamp (integer) --

          The Unix timestamp when the set of featured results was last updated.

        • CreationTimestamp (integer) --

          The Unix timestamp when the set of featured results was created.

    • NextToken (string) --

      If the response is truncated, Amazon Kendra returns a pagination token in the response.

DescribeFeaturedResultsSet (new) Link ¶

Gets information about a set of featured results. Features results are placed above all other results for certain queries. If there's an exact match of a query, then one or more specific documents are featured in the search results.

See also: AWS API Documentation

Request Syntax

client.describe_featured_results_set(
    IndexId='string',
    FeaturedResultsSetId='string'
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index used for featuring results.

type FeaturedResultsSetId

string

param FeaturedResultsSetId

[REQUIRED]

The identifier of the set of featured results that you want to get information on.

rtype

dict

returns

Response Syntax

{
    'FeaturedResultsSetId': 'string',
    'FeaturedResultsSetName': 'string',
    'Description': 'string',
    'Status': 'ACTIVE'|'INACTIVE',
    'QueryTexts': [
        'string',
    ],
    'FeaturedDocumentsWithMetadata': [
        {
            'Id': 'string',
            'Title': 'string',
            'URI': 'string'
        },
    ],
    'FeaturedDocumentsMissing': [
        {
            'Id': 'string'
        },
    ],
    'LastUpdatedTimestamp': 123,
    'CreationTimestamp': 123
}

Response Structure

  • (dict) --

    • FeaturedResultsSetId (string) --

      The identifier of the set of featured results.

    • FeaturedResultsSetName (string) --

      The name for the set of featured results.

    • Description (string) --

      The description for the set of featured results.

    • Status (string) --

      The current status of the set of featured results. When the value is ACTIVE , featured results are ready for use. You can still configure your settings before setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE .

    • QueryTexts (list) --

      The list of queries for featuring results. For more information on the list of queries, see FeaturedResultsSet.

      • (string) --

    • FeaturedDocumentsWithMetadata (list) --

      The list of document IDs for the documents you want to feature with their metadata information. For more information on the list of featured documents, see FeaturedResultsSet.

      • (dict) --

        A featured document with its metadata information. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

        • Id (string) --

          The identifier of the featured document with its metadata. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.

        • Title (string) --

          The main title of the featured document.

        • URI (string) --

          The source URI location of the featured document.

    • FeaturedDocumentsMissing (list) --

      The list of document IDs that don't exist but you have specified as featured documents. Amazon Kendra cannot feature these documents if they don't exist in the index. You can check the status of a document and its ID or check for documents with status errors using the BatchGetDocumentStatus API.

      • (dict) --

        A document ID doesn't exist but you have specified as a featured document. Amazon Kendra cannot feature the document if it doesn't exist in the index. You can check the status of a document and its ID or check for documents with status errors using the BatchGetDocumentStatus API.

        • Id (string) --

          The identifier of the document that doesn't exist but you have specified as a featured document.

    • LastUpdatedTimestamp (integer) --

      The timestamp when the set of featured results was last updated.

    • CreationTimestamp (integer) --

      The Unix timestamp when the set of the featured results was created.

Query (updated) Link ¶
Changes (response)
{'FeaturedResultsItems': [{'AdditionalAttributes': [{'Key': 'string',
                                                     'Value': {'TextWithHighlightsValue': {'Highlights': [{'BeginOffset': 'integer',
                                                                                                           'EndOffset': 'integer',
                                                                                                           'TopAnswer': 'boolean',
                                                                                                           'Type': 'STANDARD '
                                                                                                                   '| '
                                                                                                                   'THESAURUS_SYNONYM'}],
                                                                                           'Text': 'string'}},
                                                     'ValueType': 'TEXT_WITH_HIGHLIGHTS_VALUE'}],
                           'DocumentAttributes': [{'Key': 'string',
                                                   'Value': {'DateValue': 'timestamp',
                                                             'LongValue': 'long',
                                                             'StringListValue': ['string'],
                                                             'StringValue': 'string'}}],
                           'DocumentExcerpt': {'Highlights': [{'BeginOffset': 'integer',
                                                               'EndOffset': 'integer',
                                                               'TopAnswer': 'boolean',
                                                               'Type': 'STANDARD '
                                                                       '| '
                                                                       'THESAURUS_SYNONYM'}],
                                               'Text': 'string'},
                           'DocumentId': 'string',
                           'DocumentTitle': {'Highlights': [{'BeginOffset': 'integer',
                                                             'EndOffset': 'integer',
                                                             'TopAnswer': 'boolean',
                                                             'Type': 'STANDARD '
                                                                     '| '
                                                                     'THESAURUS_SYNONYM'}],
                                             'Text': 'string'},
                           'DocumentURI': 'string',
                           'FeedbackToken': 'string',
                           'Id': 'string',
                           'Type': 'DOCUMENT | QUESTION_ANSWER | ANSWER'}]}

Searches an active index. Use this API to search your documents using query. The Query API enables to do faceted search and to filter results based on document attributes.

It also enables you to provide user context that Amazon Kendra uses to enforce document access control in the search results.

Amazon Kendra searches your index for text content and question and answer (FAQ) content. By default the response contains three types of results.

  • Relevant passages

  • Matching FAQs

  • Relevant documents

You can specify that the query return only one type of result using the QueryResultTypeFilter parameter.

Each query returns the 100 most relevant results.

See also: AWS API Documentation

Request Syntax

client.query(
    IndexId='string',
    QueryText='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)
            }
        }
    },
    Facets=[
        {
            'DocumentAttributeKey': 'string',
            'Facets': {'... recursive ...'},
            'MaxResults': 123
        },
    ],
    RequestedDocumentAttributes=[
        'string',
    ],
    QueryResultTypeFilter='DOCUMENT'|'QUESTION_ANSWER'|'ANSWER',
    DocumentRelevanceOverrideConfigurations=[
        {
            'Name': 'string',
            'Relevance': {
                'Freshness': True|False,
                'Importance': 123,
                'Duration': 'string',
                'RankOrder': 'ASCENDING'|'DESCENDING',
                'ValueImportanceMap': {
                    'string': 123
                }
            }
        },
    ],
    PageNumber=123,
    PageSize=123,
    SortingConfiguration={
        'DocumentAttributeKey': 'string',
        'SortOrder': 'DESC'|'ASC'
    },
    UserContext={
        'Token': 'string',
        'UserId': 'string',
        'Groups': [
            'string',
        ],
        'DataSourceGroups': [
            {
                'GroupId': 'string',
                'DataSourceId': 'string'
            },
        ]
    },
    VisitorId='string',
    SpellCorrectionConfiguration={
        'IncludeQuerySpellCheckSuggestions': True|False
    }
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index to search. The identifier is returned in the response from the CreateIndex API.

type QueryText

string

param QueryText

The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries.

type AttributeFilter

dict

param AttributeFilter

Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the AndAllFilters , NotFilter , and OrAllFilters parameters contain a list of other filters.

The AttributeFilter parameter enables you to create a set of filtering rules that a document must satisfy to be included in the query results.

  • 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.

type Facets

list

param Facets

An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. This helps your users narrow their search.

  • (dict) --

    Information about a document attribute. You can use document attributes as facets.

    For example, the document attribute or facet "Department" includes the values "HR", "Engineering", and "Accounting". You can display these values in the search results so that documents can be searched by department.

    You can display up to 10 facet values per facet for a query. If you want to increase this limit, contact Support.

    • DocumentAttributeKey (string) --

      The unique key for the document attribute.

    • Facets (list) --

      An array of document attributes that are nested facets within a facet.

      For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. This helps your users further narrow their search.

      You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

    • MaxResults (integer) --

      Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values to less than 10. If you want to increase the default, contact Support.

type RequestedDocumentAttributes

list

param RequestedDocumentAttributes

An array of document attributes to include in the response. You can limit the response to include certain document attributes. By default all document attributes are included in the response.

  • (string) --

type QueryResultTypeFilter

string

param QueryResultTypeFilter

Sets the type of query. Only results for the specified query type are returned.

type DocumentRelevanceOverrideConfigurations

list

param DocumentRelevanceOverrideConfigurations

Overrides relevance tuning configurations of fields or attributes set at the index level.

If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.

If there is relevance tuning configured at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.

If there is relevance tuning configured for fields at the index level, but you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.

  • (dict) --

    Overrides the document relevance properties of a custom index field.

    • Name (string) -- [REQUIRED]

      The name of the index field.

    • Relevance (dict) -- [REQUIRED]

      Provides information for tuning the relevance of a field in a search. When a query includes terms that match the field, the results are given a boost in the response based on these tuning parameters.

      • Freshness (boolean) --

        Indicates that this field determines how "fresh" a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is "fresher" than document 2. You can only set the Freshness field on one DATE type field. Only applies to DATE fields.

      • Importance (integer) --

        The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.

      • Duration (string) --

        Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use "2628000s". Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don't specify a value, the default is 3 months. The value of the field is a numeric string followed by the character "s", for example "86400s" for one day, or "604800s" for one week.

        Only applies to DATE fields.

      • RankOrder (string) --

        Determines how values should be interpreted.

        When the RankOrder field is ASCENDING , higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1.

        When the RankOrder field is DESCENDING , lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task.

        Only applies to LONG and DOUBLE fields.

      • ValueImportanceMap (dict) --

        A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called "department," query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.

        For example, you can add entries to the map with names of departments. If you add "HR",5 and "Legal",3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.

        • (string) --

          • (integer) --

type PageNumber

integer

param PageNumber

Query results are returned in pages the size of the PageSize parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.

type PageSize

integer

param PageSize

Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.

type SortingConfiguration

dict

param SortingConfiguration

Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance.

If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.

  • DocumentAttributeKey (string) -- [REQUIRED]

    The name of the document attribute used to sort the response. You can use any field that has the Sortable flag set to true.

    You can also sort by any of the following built-in attributes:

    • _category

    • _created_at

    • _last_updated_at

    • _version

    • _view_count

  • SortOrder (string) -- [REQUIRED]

    The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.

type UserContext

dict

param UserContext

The user context token or user and group information.

  • 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.

type VisitorId

string

param VisitorId

Provides an identifier for a specific user. The VisitorId should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the VisitorId .

type SpellCorrectionConfiguration

dict

param SpellCorrectionConfiguration

Enables suggested spell corrections for queries.

  • IncludeQuerySpellCheckSuggestions (boolean) -- [REQUIRED]

    TRUE to suggest spell corrections for queries.

rtype

dict

returns

Response Syntax

{
    'QueryId': 'string',
    'ResultItems': [
        {
            'Id': 'string',
            'Type': 'DOCUMENT'|'QUESTION_ANSWER'|'ANSWER',
            'Format': 'TABLE'|'TEXT',
            'AdditionalAttributes': [
                {
                    'Key': 'string',
                    'ValueType': 'TEXT_WITH_HIGHLIGHTS_VALUE',
                    'Value': {
                        'TextWithHighlightsValue': {
                            'Text': 'string',
                            'Highlights': [
                                {
                                    'BeginOffset': 123,
                                    'EndOffset': 123,
                                    'TopAnswer': True|False,
                                    'Type': 'STANDARD'|'THESAURUS_SYNONYM'
                                },
                            ]
                        }
                    }
                },
            ],
            'DocumentId': 'string',
            'DocumentTitle': {
                'Text': 'string',
                'Highlights': [
                    {
                        'BeginOffset': 123,
                        'EndOffset': 123,
                        'TopAnswer': True|False,
                        'Type': 'STANDARD'|'THESAURUS_SYNONYM'
                    },
                ]
            },
            'DocumentExcerpt': {
                'Text': 'string',
                'Highlights': [
                    {
                        'BeginOffset': 123,
                        'EndOffset': 123,
                        'TopAnswer': True|False,
                        'Type': 'STANDARD'|'THESAURUS_SYNONYM'
                    },
                ]
            },
            'DocumentURI': 'string',
            'DocumentAttributes': [
                {
                    'Key': 'string',
                    'Value': {
                        'StringValue': 'string',
                        'StringListValue': [
                            'string',
                        ],
                        'LongValue': 123,
                        'DateValue': datetime(2015, 1, 1)
                    }
                },
            ],
            'ScoreAttributes': {
                'ScoreConfidence': 'VERY_HIGH'|'HIGH'|'MEDIUM'|'LOW'|'NOT_AVAILABLE'
            },
            'FeedbackToken': 'string',
            'TableExcerpt': {
                'Rows': [
                    {
                        'Cells': [
                            {
                                'Value': 'string',
                                'TopAnswer': True|False,
                                'Highlighted': True|False,
                                'Header': True|False
                            },
                        ]
                    },
                ],
                'TotalNumberOfRows': 123
            }
        },
    ],
    'FacetResults': [
        {
            'DocumentAttributeKey': 'string',
            'DocumentAttributeValueType': 'STRING_VALUE'|'STRING_LIST_VALUE'|'LONG_VALUE'|'DATE_VALUE',
            'DocumentAttributeValueCountPairs': [
                {
                    'DocumentAttributeValue': {
                        'StringValue': 'string',
                        'StringListValue': [
                            'string',
                        ],
                        'LongValue': 123,
                        'DateValue': datetime(2015, 1, 1)
                    },
                    'Count': 123,
                    'FacetResults': {'... recursive ...'}
                },
            ]
        },
    ],
    'TotalNumberOfResults': 123,
    'Warnings': [
        {
            'Message': 'string',
            'Code': 'QUERY_LANGUAGE_INVALID_SYNTAX'
        },
    ],
    'SpellCorrectedQueries': [
        {
            'SuggestedQueryText': 'string',
            'Corrections': [
                {
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Term': 'string',
                    'CorrectedTerm': 'string'
                },
            ]
        },
    ],
    'FeaturedResultsItems': [
        {
            'Id': 'string',
            'Type': 'DOCUMENT'|'QUESTION_ANSWER'|'ANSWER',
            'AdditionalAttributes': [
                {
                    'Key': 'string',
                    'ValueType': 'TEXT_WITH_HIGHLIGHTS_VALUE',
                    'Value': {
                        'TextWithHighlightsValue': {
                            'Text': 'string',
                            'Highlights': [
                                {
                                    'BeginOffset': 123,
                                    'EndOffset': 123,
                                    'TopAnswer': True|False,
                                    'Type': 'STANDARD'|'THESAURUS_SYNONYM'
                                },
                            ]
                        }
                    }
                },
            ],
            'DocumentId': 'string',
            'DocumentTitle': {
                'Text': 'string',
                'Highlights': [
                    {
                        'BeginOffset': 123,
                        'EndOffset': 123,
                        'TopAnswer': True|False,
                        'Type': 'STANDARD'|'THESAURUS_SYNONYM'
                    },
                ]
            },
            'DocumentExcerpt': {
                'Text': 'string',
                'Highlights': [
                    {
                        'BeginOffset': 123,
                        'EndOffset': 123,
                        'TopAnswer': True|False,
                        'Type': 'STANDARD'|'THESAURUS_SYNONYM'
                    },
                ]
            },
            'DocumentURI': 'string',
            'DocumentAttributes': [
                {
                    'Key': 'string',
                    'Value': {
                        'StringValue': 'string',
                        'StringListValue': [
                            'string',
                        ],
                        'LongValue': 123,
                        'DateValue': datetime(2015, 1, 1)
                    }
                },
            ],
            'FeedbackToken': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • QueryId (string) --

      The identifier for the search. You use QueryId to identify the search when using the feedback API.

    • ResultItems (list) --

      The results of the search.

      • (dict) --

        A single query result.

        A query result contains information about a document returned by the query. This includes the original location of the document, a list of attributes assigned to the document, and relevant text from the document that satisfies the query.

        • Id (string) --

          The identifier for the query result.

        • Type (string) --

          The type of document within the response. For example, a response could include a question-answer that's relevant to the query.

        • Format (string) --

          If the Type of document within the response is ANSWER , then it is either a TABLE answer or TEXT answer. If it's a table answer, a table excerpt is returned in TableExcerpt . If it's a text answer, a text excerpt is returned in DocumentExcerpt .

        • AdditionalAttributes (list) --

          One or more additional attributes associated with the query result.

          • (dict) --

            An attribute returned from an index query.

            • Key (string) --

              The key that identifies the attribute.

            • ValueType (string) --

              The data type of the Value property.

            • Value (dict) --

              An object that contains the attribute value.

              • TextWithHighlightsValue (dict) --

                The text associated with the attribute and information about the highlight to apply to the text.

                • Text (string) --

                  The text to display to the user.

                • Highlights (list) --

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

                  • (dict) --

                    Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.

                    • 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.

                    • TopAnswer (boolean) --

                      Indicates whether the response is the best response. True if this is the best response; otherwise, false.

                    • Type (string) --

                      The highlight type.

        • DocumentId (string) --

          The identifier for the document.

        • DocumentTitle (dict) --

          The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.

          • Text (string) --

            The text to display to the user.

          • Highlights (list) --

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

            • (dict) --

              Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.

              • 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.

              • TopAnswer (boolean) --

                Indicates whether the response is the best response. True if this is the best response; otherwise, false.

              • Type (string) --

                The highlight type.

        • DocumentExcerpt (dict) --

          An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.

          • Text (string) --

            The text to display to the user.

          • Highlights (list) --

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

            • (dict) --

              Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.

              • 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.

              • TopAnswer (boolean) --

                Indicates whether the response is the best response. True if this is the best response; otherwise, false.

              • Type (string) --

                The highlight type.

        • DocumentURI (string) --

          The URI of the original location of the document.

        • DocumentAttributes (list) --

          An array of document attributes assigned to a document in the search results. For example, the document author ( _author ) or the source URI ( _source_uri ) of the document.

          • (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.

        • ScoreAttributes (dict) --

          Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each result is placed into a bin that indicates the confidence, VERY_HIGH , HIGH , MEDIUM and LOW . You can use the score to determine if a response meets the confidence needed for your application.

          The field is only set to LOW when the Type field is set to DOCUMENT and Amazon Kendra is not confident that the result matches the query.

          • ScoreConfidence (string) --

            A relative ranking for how well the response matches the query.

        • FeedbackToken (string) --

          A token that identifies a particular result from a particular query. Use this token to provide click-through feedback for the result. For more information, see Submitting feedback.

        • TableExcerpt (dict) --

          An excerpt from a table within a document.

          • Rows (list) --

            A list of rows in the table excerpt.

            • (dict) --

              Information about a row in a table excerpt.

              • Cells (list) --

                A list of table cells in a row.

                • (dict) --

                  Provides information about a table cell in a table excerpt.

                  • Value (string) --

                    The actual value or content within a table cell. A table cell could contain a date value of a year, or a string value of text, for example.

                  • TopAnswer (boolean) --

                    TRUE if the response of the table cell is the top answer. This is the cell value or content with the highest confidence score or is the most relevant to the query.

                  • Highlighted (boolean) --

                    TRUE means that the table cell has a high enough confidence and is relevant to the query, so the value or content should be highlighted.

                  • Header (boolean) --

                    TRUE means that the table cell should be treated as a header.

          • TotalNumberOfRows (integer) --

            A count of the number of rows in the original table within the document.

    • FacetResults (list) --

      Contains the facet results. A FacetResult contains the counts for each attribute key that was specified in the Facets input parameter.

      • (dict) --

        The facet values for the documents in the response.

        • DocumentAttributeKey (string) --

          The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.

        • DocumentAttributeValueType (string) --

          The data type of the facet value. This is the same as the type defined for the index field when it was created.

        • DocumentAttributeValueCountPairs (list) --

          An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.

          • (dict) --

            Provides the count of documents that match a particular attribute when doing a faceted search.

            • DocumentAttributeValue (dict) --

              The value of the attribute. For example, "HR".

              • 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.

            • Count (integer) --

              The number of documents in the response that have the attribute value for the key.

            • FacetResults (list) --

              Contains the results of a document attribute that is a nested facet. A FacetResult contains the counts for each facet nested within a facet.

              For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.

    • TotalNumberOfResults (integer) --

      The total number of items found by the search; however, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.

    • Warnings (list) --

      A list of warning codes and their messages on problems with your query.

      Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.

      • (dict) --

        The warning code and message that explains a problem with a query.

        • Message (string) --

          The message that explains the problem with the query.

        • Code (string) --

          The code used to show the type of warning for the query.

    • SpellCorrectedQueries (list) --

      A list of information related to suggested spell corrections for a query.

      • (dict) --

        A query with suggested spell corrections.

        • SuggestedQueryText (string) --

          The query with the suggested spell corrections.

        • Corrections (list) --

          The corrected misspelled word or words in a query.

          • (dict) --

            A corrected misspelled word in a query.

            • BeginOffset (integer) --

              The zero-based location in the response string or text where the corrected word starts.

            • EndOffset (integer) --

              The zero-based location in the response string or text where the corrected word ends.

            • Term (string) --

              The string or text of a misspelled word in a query.

            • CorrectedTerm (string) --

              The string or text of a corrected misspelled word in a query.

    • FeaturedResultsItems (list) --

      The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.

      • (dict) --

        A single featured result item. A featured result is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.

        • Id (string) --

          The identifier of the featured result.

        • Type (string) --

          The type of document within the featured result response. For example, a response could include a question-answer type that's relevant to the query.

        • AdditionalAttributes (list) --

          One or more additional attributes associated with the featured result.

          • (dict) --

            An attribute returned from an index query.

            • Key (string) --

              The key that identifies the attribute.

            • ValueType (string) --

              The data type of the Value property.

            • Value (dict) --

              An object that contains the attribute value.

              • TextWithHighlightsValue (dict) --

                The text associated with the attribute and information about the highlight to apply to the text.

                • Text (string) --

                  The text to display to the user.

                • Highlights (list) --

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

                  • (dict) --

                    Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.

                    • 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.

                    • TopAnswer (boolean) --

                      Indicates whether the response is the best response. True if this is the best response; otherwise, false.

                    • Type (string) --

                      The highlight type.

        • DocumentId (string) --

          The identifier of the featured document.

        • DocumentTitle (dict) --

          Provides text and information about where to highlight the text.

          • Text (string) --

            The text to display to the user.

          • Highlights (list) --

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

            • (dict) --

              Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.

              • 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.

              • TopAnswer (boolean) --

                Indicates whether the response is the best response. True if this is the best response; otherwise, false.

              • Type (string) --

                The highlight type.

        • DocumentExcerpt (dict) --

          Provides text and information about where to highlight the text.

          • Text (string) --

            The text to display to the user.

          • Highlights (list) --

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

            • (dict) --

              Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.

              • 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.

              • TopAnswer (boolean) --

                Indicates whether the response is the best response. True if this is the best response; otherwise, false.

              • Type (string) --

                The highlight type.

        • DocumentURI (string) --

          The source URI location of the featured document.

        • DocumentAttributes (list) --

          An array of document attributes assigned to a featured document in the search results. For example, the document author ( _author ) or the source URI ( _source_uri ) of the document.

          • (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.

        • FeedbackToken (string) --

          A token that identifies a particular featured result from a particular query. Use this token to provide click-through feedback for the result. For more information, see Submitting feedback.