Class DocumentAttributeBoostingConfiguration

java.lang.Object
software.amazon.awssdk.services.qbusiness.model.DocumentAttributeBoostingConfiguration
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<DocumentAttributeBoostingConfiguration.Builder,DocumentAttributeBoostingConfiguration>

@Generated("software.amazon.awssdk:codegen") public final class DocumentAttributeBoostingConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DocumentAttributeBoostingConfiguration.Builder,DocumentAttributeBoostingConfiguration>

Provides information on boosting supported Amazon Q Business document attribute types. When an end user chat query matches document attributes that have been boosted, Amazon Q Business prioritizes generating responses from content that matches the boosted document attributes.

In version 2, boosting uses numeric values (ONE, TWO) to indicate priority tiers that establish clear hierarchical relationships between boosted attributes. This allows for more precise control over how different attributes influence search results.

For STRING and STRING_LIST type document attributes to be used for boosting on the console and the API, they must be enabled for search using the DocumentAttributeConfiguration object of the UpdateIndex API. If you haven't enabled searching on these attributes, you can't boost attributes of these data types on either the console or the API.

For more information on how boosting document attributes work in Amazon Q Business, see Boosting using document attributes.

See Also:
  • Method Details

    • numberConfiguration

      public final NumberAttributeBoostingConfiguration numberConfiguration()

      Provides information on boosting NUMBER type document attributes.

      NUMBER attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

      Returns:
      Provides information on boosting NUMBER type document attributes.

      NUMBER attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

    • stringConfiguration

      public final StringAttributeBoostingConfiguration stringConfiguration()

      Provides information on boosting STRING type document attributes.

      Version 2 assigns priority tiers to STRING attributes, establishing clear hierarchical relationships with other boosted attributes.

      Returns:
      Provides information on boosting STRING type document attributes.

      Version 2 assigns priority tiers to STRING attributes, establishing clear hierarchical relationships with other boosted attributes.

    • dateConfiguration

      public final DateAttributeBoostingConfiguration dateConfiguration()

      Provides information on boosting DATE type document attributes.

      Version 2 assigns priority tiers to DATE attributes, establishing clear hierarchical relationships with other boosted attributes.

      Returns:
      Provides information on boosting DATE type document attributes.

      Version 2 assigns priority tiers to DATE attributes, establishing clear hierarchical relationships with other boosted attributes.

    • stringListConfiguration

      public final StringListAttributeBoostingConfiguration stringListConfiguration()

      Provides information on boosting STRING_LIST type document attributes.

      STRING_LIST attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

      Returns:
      Provides information on boosting STRING_LIST type document attributes.

      STRING_LIST attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<DocumentAttributeBoostingConfiguration.Builder,DocumentAttributeBoostingConfiguration>
      Returns:
      a builder for type T
    • builder

    • serializableBuilderClass

      public static Class<? extends DocumentAttributeBoostingConfiguration.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • fromNumberConfiguration

      public static DocumentAttributeBoostingConfiguration fromNumberConfiguration(NumberAttributeBoostingConfiguration numberConfiguration)
      Create an instance of this class with numberConfiguration() initialized to the given value.

      Provides information on boosting NUMBER type document attributes.

      NUMBER attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

      Parameters:
      numberConfiguration - Provides information on boosting NUMBER type document attributes.

      NUMBER attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

    • fromNumberConfiguration

      public static DocumentAttributeBoostingConfiguration fromNumberConfiguration(Consumer<NumberAttributeBoostingConfiguration.Builder> numberConfiguration)
      Create an instance of this class with numberConfiguration() initialized to the given value.

      Provides information on boosting NUMBER type document attributes.

      NUMBER attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

      Parameters:
      numberConfiguration - Provides information on boosting NUMBER type document attributes.

      NUMBER attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

    • fromStringConfiguration

      public static DocumentAttributeBoostingConfiguration fromStringConfiguration(StringAttributeBoostingConfiguration stringConfiguration)
      Create an instance of this class with stringConfiguration() initialized to the given value.

      Provides information on boosting STRING type document attributes.

      Version 2 assigns priority tiers to STRING attributes, establishing clear hierarchical relationships with other boosted attributes.

      Parameters:
      stringConfiguration - Provides information on boosting STRING type document attributes.

      Version 2 assigns priority tiers to STRING attributes, establishing clear hierarchical relationships with other boosted attributes.

    • fromStringConfiguration

      public static DocumentAttributeBoostingConfiguration fromStringConfiguration(Consumer<StringAttributeBoostingConfiguration.Builder> stringConfiguration)
      Create an instance of this class with stringConfiguration() initialized to the given value.

      Provides information on boosting STRING type document attributes.

      Version 2 assigns priority tiers to STRING attributes, establishing clear hierarchical relationships with other boosted attributes.

      Parameters:
      stringConfiguration - Provides information on boosting STRING type document attributes.

      Version 2 assigns priority tiers to STRING attributes, establishing clear hierarchical relationships with other boosted attributes.

    • fromDateConfiguration

      public static DocumentAttributeBoostingConfiguration fromDateConfiguration(DateAttributeBoostingConfiguration dateConfiguration)
      Create an instance of this class with dateConfiguration() initialized to the given value.

      Provides information on boosting DATE type document attributes.

      Version 2 assigns priority tiers to DATE attributes, establishing clear hierarchical relationships with other boosted attributes.

      Parameters:
      dateConfiguration - Provides information on boosting DATE type document attributes.

      Version 2 assigns priority tiers to DATE attributes, establishing clear hierarchical relationships with other boosted attributes.

    • fromDateConfiguration

      public static DocumentAttributeBoostingConfiguration fromDateConfiguration(Consumer<DateAttributeBoostingConfiguration.Builder> dateConfiguration)
      Create an instance of this class with dateConfiguration() initialized to the given value.

      Provides information on boosting DATE type document attributes.

      Version 2 assigns priority tiers to DATE attributes, establishing clear hierarchical relationships with other boosted attributes.

      Parameters:
      dateConfiguration - Provides information on boosting DATE type document attributes.

      Version 2 assigns priority tiers to DATE attributes, establishing clear hierarchical relationships with other boosted attributes.

    • fromStringListConfiguration

      public static DocumentAttributeBoostingConfiguration fromStringListConfiguration(StringListAttributeBoostingConfiguration stringListConfiguration)
      Create an instance of this class with stringListConfiguration() initialized to the given value.

      Provides information on boosting STRING_LIST type document attributes.

      STRING_LIST attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

      Parameters:
      stringListConfiguration - Provides information on boosting STRING_LIST type document attributes.

      STRING_LIST attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

    • fromStringListConfiguration

      public static DocumentAttributeBoostingConfiguration fromStringListConfiguration(Consumer<StringListAttributeBoostingConfiguration.Builder> stringListConfiguration)
      Create an instance of this class with stringListConfiguration() initialized to the given value.

      Provides information on boosting STRING_LIST type document attributes.

      STRING_LIST attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

      Parameters:
      stringListConfiguration - Provides information on boosting STRING_LIST type document attributes.

      STRING_LIST attributes are not supported when using NativeIndexConfiguration version 2, which focuses on DATE attributes for recency and STRING attributes for source prioritization.

    • type

      Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will be DocumentAttributeBoostingConfiguration.Type.UNKNOWN_TO_SDK_VERSION if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will be DocumentAttributeBoostingConfiguration.Type.UNKNOWN_TO_SDK_VERSION if zero members are set, and null if more than one member is set.
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.