class Aws::Kendra::Types::AttributeFilter

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>`

  1. ` <OrAllFilters>`

  2. ` <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.”

If you use more than 10 attribute filters, you receive a `ValidationException` exception with the message “`AttributeFilter` cannot have a length of more than 10”.

@note When making an API call, you may pass AttributeFilter

data as a hash:

    {
      and_all_filters: [
        {
          and_all_filters: {
            # recursive AttributeFilterList
          },
          or_all_filters: {
            # recursive AttributeFilterList
          },
          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,
            },
          },
        },
      ],
      or_all_filters: [
        {
          and_all_filters: {
            # recursive AttributeFilterList
          },
          or_all_filters: {
            # recursive AttributeFilterList
          },
          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,
            },
          },
        },
      ],
      not_filter: {
        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,
          },
        },
      },
      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,
        },
      },
    }

@!attribute [rw] and_all_filters

Performs a logical `AND` operation on all supplied filters.
@return [Array<Types::AttributeFilter>]

@!attribute [rw] or_all_filters

Performs a logical `OR` operation on all supplied filters.
@return [Array<Types::AttributeFilter>]

@!attribute [rw] not_filter

Performs a logical `NOT` operation on all supplied filters.
@return [Types::AttributeFilter]

@!attribute [rw] equals_to

Performs an equals operation on two document attributes.
@return [Types::DocumentAttribute]

@!attribute [rw] contains_all

Returns true when a document contains all of the specified document
attributes. This filter is only applicable to `StringListValue`
metadata.
@return [Types::DocumentAttribute]

@!attribute [rw] contains_any

Returns true when a document contains any of the specified document
attributes. This filter is only applicable to `StringListValue`
metadata.
@return [Types::DocumentAttribute]

@!attribute [rw] greater_than

Performs a greater than operation on two document attributes. Use
with a document attribute of type `Integer` or `Long`.
@return [Types::DocumentAttribute]

@!attribute [rw] greater_than_or_equals

Performs a greater or equals than operation on two document
attributes. Use with a document attribute of type `Integer` or
`Long`.
@return [Types::DocumentAttribute]

@!attribute [rw] less_than

Performs a less than operation on two document attributes. Use with
a document attribute of type `Integer` or `Long`.
@return [Types::DocumentAttribute]

@!attribute [rw] less_than_or_equals

Performs a less than or equals operation on two document attributes.
Use with a document attribute of type `Integer` or `Long`.
@return [Types::DocumentAttribute]

@see docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/AttributeFilter AWS API Documentation

Constants

SENSITIVE