Interface CollapseConfiguration.Builder

    • Method Detail

      • documentAttributeKey

        CollapseConfiguration.Builder documentAttributeKey​(String 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".

        Parameters:
        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".
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • sortingConfigurations

        CollapseConfiguration.Builder sortingConfigurations​(Collection<SortingConfiguration> sortingConfigurations)

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

        Parameters:
        sortingConfigurations - A prioritized list of document attributes/fields that determine the primary document among those in a collapsed group.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • sortingConfigurations

        CollapseConfiguration.Builder sortingConfigurations​(SortingConfiguration... sortingConfigurations)

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

        Parameters:
        sortingConfigurations - A prioritized list of document attributes/fields that determine the primary document among those in a collapsed group.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • missingAttributeKeyStrategy

        CollapseConfiguration.Builder missingAttributeKeyStrategy​(String 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        MissingAttributeKeyStrategy, MissingAttributeKeyStrategy
      • missingAttributeKeyStrategy

        CollapseConfiguration.Builder missingAttributeKeyStrategy​(MissingAttributeKeyStrategy 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        MissingAttributeKeyStrategy, MissingAttributeKeyStrategy
      • expand

        CollapseConfiguration.Builder expand​(Boolean expand)

        Specifies whether to expand the collapsed results.

        Parameters:
        expand - Specifies whether to expand the collapsed results.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • expandConfiguration

        CollapseConfiguration.Builder expandConfiguration​(ExpandConfiguration expandConfiguration)

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

        Parameters:
        expandConfiguration - Provides configuration information to customize expansion options for a collapsed group.
        Returns:
        Returns a reference to this object so that method calls can be chained together.