Class: Aws::Kendra::Types::AttributeFilter

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 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,
    },
  },
}

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."

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#and_all_filtersArray<Types::AttributeFilter>

Performs a logical AND operation on all supplied filters.

Returns:



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#contains_allTypes::DocumentAttribute

Returns true when a document contains all of the specified document attributes. This filter is only appicable to StringListValue metadata.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#contains_anyTypes::DocumentAttribute

Returns true when a document contains any of the specified document attributes.This filter is only appicable to StringListValue metadata.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#equals_toTypes::DocumentAttribute

Performs an equals operation on two document attributes.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#greater_thanTypes::DocumentAttribute

Performs a greater than operation on two document attributes. Use with a document attribute of type Integer or Long.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#greater_than_or_equalsTypes::DocumentAttribute

Performs a greater or equals than operation on two document attributes. Use with a document attribute of type Integer or Long.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#less_thanTypes::DocumentAttribute

Performs a less than operation on two document attributes. Use with a document attribute of type Integer or Long.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#less_than_or_equalsTypes::DocumentAttribute

Performs a less than or equals operation on two document attributes. Use with a document attribute of type Integer or Long.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#not_filterTypes::AttributeFilter

Performs a logical NOT operation on all supplied filters.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end

#or_all_filtersArray<Types::AttributeFilter>

Performs a logical OR operation on all supplied filters.

Returns:



475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 475

class AttributeFilter < Struct.new(
  :and_all_filters,
  :or_all_filters,
  :not_filter,
  :equals_to,
  :contains_all,
  :contains_any,
  :greater_than,
  :greater_than_or_equals,
  :less_than,
  :less_than_or_equals)
  SENSITIVE = []
  include Aws::Structure
end