Skip to content

CollapseConfiguration

Source code in docs_src/capo_kendra/types/collapse_configuration.py
class CollapseConfiguration(TypedDict, closed=True):
    document_attribute_key: (
        "capo_kendra.types.document_attribute_key.DocumentAttributeKey"
    )
    """<p>The document attribute used to group search results. You can use any attribute that has the <code>Sortable</code> 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".</p>"""
    sorting_configurations: NotRequired[
        "capo_kendra.types.sorting_configuration_list.SortingConfigurationList"
    ]
    """<p>A prioritized list of document attributes/fields that determine the primary document among those in a collapsed group.</p>"""
    missing_attribute_key_strategy: NotRequired[
        "capo_kendra.types.missing_attribute_key_strategy.MissingAttributeKeyStrategy"
    ]
    """<p>Specifies the behavior for documents without a value for the collapse attribute.</p> <p>Amazon Kendra offers three customization options:</p> <ul> <li> <p>Choose to <code>COLLAPSE</code> all documents with null or missing values in one group. This is the default configuration.</p> </li> <li> <p>Choose to <code>IGNORE</code> documents with null or missing values. Ignored documents will not appear in query results.</p> </li> <li> <p>Choose to <code>EXPAND</code> each document with a null or missing value into a group of its own.</p> </li> </ul>"""
    expand: "capo_kendra.types.boolean.Boolean"
    """<p>Specifies whether to expand the collapsed results.</p>"""
    expand_configuration: NotRequired[
        "capo_kendra.types.expand_configuration.ExpandConfiguration"
    ]
    """<p>Provides configuration information to customize expansion options for a collapsed group.</p>"""

document_attribute_key instance-attribute

document_attribute_key: DocumentAttributeKey

The document attribute used to group search results. You can use any attribute 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".

expand instance-attribute

expand: Boolean

Specifies whether to expand the collapsed results.

expand_configuration instance-attribute

expand_configuration: NotRequired[ExpandConfiguration]

Provides configuration information to customize expansion options for a collapsed group.

missing_attribute_key_strategy instance-attribute

missing_attribute_key_strategy: NotRequired[MissingAttributeKeyStrategy]

Specifies the behavior for documents without a value for the collapse attribute.

Amazon Kendra offers three customization options:

  • Choose to COLLAPSE all documents with null or missing values in one group. This is the default configuration.

  • Choose to IGNORE documents with null or missing values. Ignored documents will not appear in query results.

  • Choose to EXPAND each document with a null or missing value into a group of its own.

sorting_configurations instance-attribute

sorting_configurations: NotRequired[SortingConfigurationList]

A prioritized list of document attributes/fields that determine the primary document among those in a collapsed group.