AttributeFilter - Amazon Kendra

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

Contents

AndAllFilters

Performs a logical AND operation on all supplied filters.

Type: Array of AttributeFilter objects

Required: No

ContainsAll

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

Type: DocumentAttribute object

Required: No

ContainsAny

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

Type: DocumentAttribute object

Required: No

EqualsTo

Performs an equals operation on two document attributes.

Type: DocumentAttribute object

Required: No

GreaterThan

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

Type: DocumentAttribute object

Required: No

GreaterThanOrEquals

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

Type: DocumentAttribute object

Required: No

LessThan

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

Type: DocumentAttribute object

Required: No

LessThanOrEquals

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

Type: DocumentAttribute object

Required: No

NotFilter

Performs a logical NOT operation on all supplied filters.

Type: AttributeFilter object

Required: No

OrAllFilters

Performs a logical OR operation on all supplied filters.

Type: Array of AttributeFilter objects

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: