CollapseConfiguration
Specifies how to group results by document attribute value, and how to display them collapsed/expanded under a designated primary document for each group.
Contents
- 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".Type: String
Length Constraints: Minimum length of 1. Maximum length of 200.
Pattern:
[a-zA-Z0-9_][a-zA-Z0-9_-]*
Required: Yes
- Expand
-
Specifies whether to expand the collapsed results.
Type: Boolean
Required: No
- ExpandConfiguration
-
Provides configuration information to customize expansion options for a collapsed group.
Type: ExpandConfiguration object
Required: No
- 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.
Type: String
Valid Values:
IGNORE | COLLAPSE | EXPAND
Required: No
-
- SortingConfigurations
-
A prioritized list of document attributes/fields that determine the primary document among those in a collapsed group.
Type: Array of SortingConfiguration objects
Array Members: Minimum number of 1 item.
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: