QBusiness / Paginator / SearchRelevantContent

SearchRelevantContent#

class QBusiness.Paginator.SearchRelevantContent#
paginator = client.get_paginator('search_relevant_content')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from QBusiness.Client.search_relevant_content().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    applicationId='string',
    queryText='string',
    contentSource={
        'retriever': {
            'retrieverId': 'string'
        }
    },
    attributeFilter={
        'andAllFilters': [
            {'... recursive ...'},
        ],
        'orAllFilters': [
            {'... recursive ...'},
        ],
        'notFilter': {'... recursive ...'},
        'equalsTo': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        },
        'containsAll': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        },
        'containsAny': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        },
        'greaterThan': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        },
        'greaterThanOrEquals': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        },
        'lessThan': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        },
        'lessThanOrEquals': {
            'name': 'string',
            'value': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'longValue': 123,
                'dateValue': datetime(2015, 1, 1)
            }
        }
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The unique identifier of the Q Business application to search.

  • queryText (string) –

    [REQUIRED]

    The text to search for.

  • contentSource (dict) –

    [REQUIRED]

    The source of content to search in.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: retriever.

    • retriever (dict) –

      The retriever to use as the content source.

      • retrieverId (string) – [REQUIRED]

        The unique identifier of the retriever to use as the content source.

  • attributeFilter (dict) –

    Enables filtering of responses based on document attributes or metadata fields.

    • andAllFilters (list) –

      Performs a logical AND operation on all supplied filters.

      • (dict) –

        Enables filtering of responses based on document attributes or metadata fields.

    • orAllFilters (list) –

      Performs a logical OR operation on all supplied filters.

      • (dict) –

        Enables filtering of responses based on document attributes or metadata fields.

    • notFilter (dict) –

      Performs a logical NOT operation on all supplied filters.

    • equalsTo (dict) –

      Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue, longValue, stringListValue and stringValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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 the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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. Supported for the following document attribute value types: stringListValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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. Supported for the following document attribute value types: dateValue and longValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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. Supported for the following document attribute value types: dateValue and longValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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. Supported for the following document attribute value types: dateValue and longValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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.Supported for the following document attribute value type: dateValue and longValue.

      • name (string) – [REQUIRED]

        The identifier for the attribute.

      • value (dict) – [REQUIRED]

        The value of the attribute.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: stringValue, stringListValue, longValue, dateValue.

        • stringValue (string) –

          A string.

        • stringListValue (list) –

          A list of strings.

          • (string) –

        • longValue (integer) –

          A long integer value.

        • dateValue (datetime) –

          A date expressed as an ISO 8601 string.

          It’s 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.

  • 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

{
    'relevantContent': [
        {
            'content': 'string',
            'documentId': 'string',
            'documentTitle': 'string',
            'documentUri': 'string',
            'documentAttributes': [
                {
                    'name': 'string',
                    'value': {
                        'stringValue': 'string',
                        'stringListValue': [
                            'string',
                        ],
                        'longValue': 123,
                        'dateValue': datetime(2015, 1, 1)
                    }
                },
            ],
            'scoreAttributes': {
                'scoreConfidence': 'VERY_HIGH'|'HIGH'|'MEDIUM'|'LOW'|'NOT_AVAILABLE'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • relevantContent (list) –

      The list of relevant content items found.

      • (dict) –

        Represents a piece of content that is relevant to a search query.

        • content (string) –

          The actual content of the relevant item.

        • documentId (string) –

          The unique identifier of the document containing the relevant content.

        • documentTitle (string) –

          The title of the document containing the relevant content.

        • documentUri (string) –

          The URI of the document containing the relevant content.

        • documentAttributes (list) –

          Additional attributes of the document containing the relevant content.

          • (dict) –

            A document attribute or metadata field.

            • name (string) –

              The identifier for the attribute.

            • value (dict) –

              The value of the attribute.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: stringValue, stringListValue, longValue, dateValue. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
              
              • stringValue (string) –

                A string.

              • stringListValue (list) –

                A list of strings.

                • (string) –

              • longValue (integer) –

                A long integer value.

              • dateValue (datetime) –

                A date expressed as an ISO 8601 string.

                It’s 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) –

          Attributes related to the relevance score of the content.

          • scoreConfidence (string) –

            The confidence level of the relevance score.

    • NextToken (string) –

      A token to resume pagination.