Class SortingConfiguration
- java.lang.Object
-
- software.amazon.awssdk.services.kendra.model.SortingConfiguration
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SortingConfiguration.Builder,SortingConfiguration>
@Generated("software.amazon.awssdk:codegen") public final class SortingConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SortingConfiguration.Builder,SortingConfiguration>
Specifies the document attribute to use to sort the response to a Amazon Kendra query. You can specify a single attribute for sorting. The attribute must have the
Sortableflag set totrue, otherwise Amazon Kendra returns an exception.You can sort attributes of the following types.
-
Date value
-
Long value
-
String value
You can't sort attributes of the following type.
-
String list value
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSortingConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SortingConfiguration.Builderbuilder()StringdocumentAttributeKey()The name of the document attribute used to sort the response.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()List<SdkField<?>>sdkFields()static Class<? extends SortingConfiguration.Builder>serializableBuilderClass()SortOrdersortOrder()The order that the results should be returned in.StringsortOrderAsString()The order that the results should be returned in.SortingConfiguration.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
documentAttributeKey
public final String documentAttributeKey()
The name of the document attribute used to sort the response. You can use any field that has the
Sortableflag 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:
- The name of the document attribute used to sort the response. You can use any field that has the
Sortableflag set to true.You can also sort by any of the following built-in attributes:
-
_category
-
_created_at
-
_last_updated_at
-
_version
-
_view_count
-
-
-
sortOrder
public final SortOrder sortOrder()
The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.
If the service returns an enum value that is not available in the current SDK version,
sortOrderwill returnSortOrder.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsortOrderAsString().- Returns:
- The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.
- See Also:
SortOrder
-
sortOrderAsString
public final String sortOrderAsString()
The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.
If the service returns an enum value that is not available in the current SDK version,
sortOrderwill returnSortOrder.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsortOrderAsString().- Returns:
- The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.
- See Also:
SortOrder
-
toBuilder
public SortingConfiguration.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<SortingConfiguration.Builder,SortingConfiguration>
-
builder
public static SortingConfiguration.Builder builder()
-
serializableBuilderClass
public static Class<? extends SortingConfiguration.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
-