You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::Kendra::Types::AttributeFilter
- Inherits:
-
Struct
- Object
- Struct
- Aws::Kendra::Types::AttributeFilter
- Defined in:
- (unknown)
Overview
When passing AttributeFilter as input to an Aws::Client method, you can use a vanilla Hash:
{
and_all_filters: [
{
# recursive AttributeFilter
},
],
or_all_filters: [
{
# recursive AttributeFilter
},
],
not_filter: {
# recursive AttributeFilter
},
equals_to: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
contains_all: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
contains_any: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
greater_than: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
greater_than_or_equals: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
less_than: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
less_than_or_equals: {
key: "DocumentAttributeKey", # required
value: { # required
string_value: "DocumentAttributeStringValue",
string_list_value: ["String"],
long_value: 1,
date_value: Time.now,
},
},
}
Provides filtering the query results based on document attributes.
When you use the AndAllFilters
or OrAllFilters
, filters you can use 2 layers under the first attribute filter. For example, you can use:
<AndAllFilters>
-
<OrAllFilters>
-
<EqualTo>
If you use more than 2 layers, you receive a ValidationException
exception with the message "AttributeFilter
cannot have a depth of more than 2."
Returned by:
Instance Attribute Summary collapse
-
#and_all_filters ⇒ Array<Types::AttributeFilter>
Performs a logical
AND
operation on all supplied filters. -
#contains_all ⇒ Types::DocumentAttribute
Returns true when a document contains all of the specified document attributes.
-
#contains_any ⇒ Types::DocumentAttribute
Returns true when a document contains any of the specified document attributes.
-
#equals_to ⇒ Types::DocumentAttribute
Performs an equals operation on two document attributes.
-
#greater_than ⇒ Types::DocumentAttribute
Performs a greater than operation on two document attributes.
-
#greater_than_or_equals ⇒ Types::DocumentAttribute
Performs a greater or equals than operation on two document attributes.
-
#less_than ⇒ Types::DocumentAttribute
Performs a less than operation on two document attributes.
-
#less_than_or_equals ⇒ Types::DocumentAttribute
Performs a less than or equals operation on two document attributes.
-
#not_filter ⇒ Types::AttributeFilter
Performs a logical
NOT
operation on all supplied filters. -
#or_all_filters ⇒ Array<Types::AttributeFilter>
Performs a logical
OR
operation on all supplied filters.
Instance Attribute Details
#and_all_filters ⇒ Array<Types::AttributeFilter>
Performs a logical AND
operation on all supplied filters.
#contains_all ⇒ Types::DocumentAttribute
Returns true when a document contains all of the specified document
attributes. This filter is only applicable to StringListValue
metadata.
#contains_any ⇒ Types::DocumentAttribute
Returns true when a document contains any of the specified document
attributes. This filter is only applicable to StringListValue
metadata.
#equals_to ⇒ Types::DocumentAttribute
Performs an equals operation on two document attributes.
#greater_than ⇒ Types::DocumentAttribute
Performs a greater than operation on two document attributes. Use with a
document attribute of type Integer
or Long
.
#greater_than_or_equals ⇒ Types::DocumentAttribute
Performs a greater or equals than operation on two document attributes.
Use with a document attribute of type Integer
or Long
.
#less_than ⇒ Types::DocumentAttribute
Performs a less than operation on two document attributes. Use with a
document attribute of type Integer
or Long
.
#less_than_or_equals ⇒ Types::DocumentAttribute
Performs a less than or equals operation on two document attributes. Use
with a document attribute of type Integer
or Long
.
#not_filter ⇒ Types::AttributeFilter
Performs a logical NOT
operation on all supplied filters.
#or_all_filters ⇒ Array<Types::AttributeFilter>
Performs a logical OR
operation on all supplied filters.