Class: Aws::Kendra::Types::SortingConfiguration

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb

Overview

Note:

When making an API call, you may pass SortingConfiguration data as a hash:

{
  document_attribute_key: "DocumentAttributeKey", # required
  sort_order: "DESC", # required, accepts DESC, ASC
}

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 Sortable flag set to true, 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

^

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#document_attribute_keyString

The name of the document attribute used to sort the response. You can use any field 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:

  • (String)


5428
5429
5430
5431
5432
5433
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 5428

class SortingConfiguration < Struct.new(
  :document_attribute_key,
  :sort_order)
  SENSITIVE = []
  include Aws::Structure
end

#sort_orderString

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.

Returns:

  • (String)


5428
5429
5430
5431
5432
5433
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 5428

class SortingConfiguration < Struct.new(
  :document_attribute_key,
  :sort_order)
  SENSITIVE = []
  include Aws::Structure
end