RetrievalFilter
Specifies the filters to use on the metadata attributes in the knowledge base data sources before returning results. For more information, see Query configurations. See the examples below to see how to use these filters.
This data type is used in the following API operations:
Retrieve request – in the
filter
fieldRetrieveAndGenerate request – in the
filter
field
Inheritors
Types
Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value matches the value
in this object.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is greater than the value
in this object.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is greater than or equal to the value
in this object.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is in the list specified in the value
in this object.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is less than the value
in this object.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is less than or equal to the value
in this object.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is a list that contains the value
as one of its members.
Knowledge base data sources are returned when:
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value isn't in the list specified in the value
in this object.
Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value starts with the value
in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is one of the following:
Functions
Casts this RetrievalFilter as a AndAll and retrieves its kotlin.collections.List
Casts this RetrievalFilter as a AndAll and retrieves its kotlin.collections.List
Casts this RetrievalFilter as a Equals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a Equals.
Casts this RetrievalFilter as a Equals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a Equals.
Casts this RetrievalFilter as a GreaterThan and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a GreaterThan.
Casts this RetrievalFilter as a GreaterThanOrEquals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a GreaterThanOrEquals.
Casts this RetrievalFilter as a GreaterThanOrEquals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a GreaterThanOrEquals.
Casts this RetrievalFilter as a GreaterThan and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a GreaterThan.
Casts this RetrievalFilter as a In and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a In.
Casts this RetrievalFilter as a In and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a In.
Casts this RetrievalFilter as a LessThan and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a LessThan.
Casts this RetrievalFilter as a LessThanOrEquals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a LessThanOrEquals.
Casts this RetrievalFilter as a LessThanOrEquals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a LessThanOrEquals.
Casts this RetrievalFilter as a LessThan and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a LessThan.
Casts this RetrievalFilter as a ListContains and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a ListContains.
Casts this RetrievalFilter as a ListContains and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a ListContains.
Casts this RetrievalFilter as a NotEquals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a NotEquals.
Casts this RetrievalFilter as a NotEquals and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a NotEquals.
Casts this RetrievalFilter as a NotIn and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a NotIn.
Casts this RetrievalFilter as a NotIn and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a NotIn.
Casts this RetrievalFilter as a OrAll and retrieves its kotlin.collections.List
Casts this RetrievalFilter as a OrAll and retrieves its kotlin.collections.List
Casts this RetrievalFilter as a StartsWith and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a StartsWith.
Casts this RetrievalFilter as a StartsWith and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a StartsWith.
Casts this RetrievalFilter as a StringContains and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Throws an exception if the RetrievalFilter is not a StringContains.
Casts this RetrievalFilter as a StringContains and retrieves its aws.sdk.kotlin.services.bedrockagentruntime.model.FilterAttribute value. Returns null if the RetrievalFilter is not a StringContains.