RetrievalFilter

sealed class 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:

Inheritors

Types

Link copied to clipboard
data class AndAll(val value: List<RetrievalFilter>) : RetrievalFilter

Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.

Link copied to clipboard
data class Equals(val value: FilterAttribute) : RetrievalFilter

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
data class In(val value: FilterAttribute) : RetrievalFilter

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.

Link copied to clipboard
data class LessThan(val value: FilterAttribute) : RetrievalFilter

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
data class NotEquals(val value: FilterAttribute) : RetrievalFilter

Knowledge base data sources are returned when:

Link copied to clipboard
data class NotIn(val value: FilterAttribute) : RetrievalFilter

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.

Link copied to clipboard
data class OrAll(val value: List<RetrievalFilter>) : RetrievalFilter

Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.

Link copied to clipboard
Link copied to clipboard
data class StartsWith(val value: FilterAttribute) : RetrievalFilter

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.

Link copied to clipboard

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

Link copied to clipboard

Casts this RetrievalFilter as a AndAll and retrieves its kotlin.collections.List value. Throws an exception if the RetrievalFilter is not a AndAll.

Link copied to clipboard

Casts this RetrievalFilter as a AndAll and retrieves its kotlin.collections.List value. Returns null if the RetrievalFilter is not a AndAll.

Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard

Casts this RetrievalFilter as a OrAll and retrieves its kotlin.collections.List value. Throws an exception if the RetrievalFilter is not a OrAll.

Link copied to clipboard

Casts this RetrievalFilter as a OrAll and retrieves its kotlin.collections.List value. Returns null if the RetrievalFilter is not a OrAll.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard