ConnectWisdomService / Paginator / QueryAssistant

QueryAssistant#

class ConnectWisdomService.Paginator.QueryAssistant#
paginator = client.get_paginator('query_assistant')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from ConnectWisdomService.Client.query_assistant().

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    assistantId='string',
    queryText='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • assistantId (string) –

    [REQUIRED]

    The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

  • queryText (string) –

    [REQUIRED]

    The text to search for.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'results': [
        {
            'document': {
                'contentReference': {
                    'contentArn': 'string',
                    'contentId': 'string',
                    'knowledgeBaseArn': 'string',
                    'knowledgeBaseId': 'string'
                },
                'excerpt': {
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ],
                    'text': 'string'
                },
                'title': {
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ],
                    'text': 'string'
                }
            },
            'relevanceScore': 123.0,
            'resultId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • results (list) –

      The results of the query.

      • (dict) –

        Information about the result.

        • document (dict) –

          The document.

          • contentReference (dict) –

            A reference to the content resource.

            • contentArn (string) –

              The Amazon Resource Name (ARN) of the content.

            • contentId (string) –

              The identifier of the content.

            • knowledgeBaseArn (string) –

              The Amazon Resource Name (ARN) of the knowledge base.

            • knowledgeBaseId (string) –

              The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you’re storing Wisdom Content resource to it.

          • excerpt (dict) –

            The excerpt from the document.

            • highlights (list) –

              Highlights in the document text.

              • (dict) –

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) –

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) –

                  The offset for the end of the highlight.

            • text (string) –

              Text in the document.

          • title (dict) –

            The title of the document.

            • highlights (list) –

              Highlights in the document text.

              • (dict) –

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) –

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) –

                  The offset for the end of the highlight.

            • text (string) –

              Text in the document.

        • relevanceScore (float) –

          The relevance score of the results.

        • resultId (string) –

          The identifier of the result data.

    • NextToken (string) –

      A token to resume pagination.