Interface RetrievalFilter.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<RetrievalFilter.Builder,,RetrievalFilter> SdkBuilder<RetrievalFilter.Builder,,RetrievalFilter> SdkPojo
- Enclosing class:
- RetrievalFilter
-
Method Summary
Modifier and TypeMethodDescriptionandAll(Collection<RetrievalFilter> andAll) Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.andAll(Consumer<RetrievalFilter.Builder>... andAll) Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.andAll(RetrievalFilter... andAll) Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.default RetrievalFilter.BuilderequalsValue(Consumer<FilterAttribute.Builder> equalsValue) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value matches thevaluein this object.equalsValue(FilterAttribute equalsValue) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value matches thevaluein this object.default RetrievalFilter.BuildergreaterThan(Consumer<FilterAttribute.Builder> greaterThan) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is greater than thevaluein this object.greaterThan(FilterAttribute greaterThan) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is greater than thevaluein this object.default RetrievalFilter.BuildergreaterThanOrEquals(Consumer<FilterAttribute.Builder> greaterThanOrEquals) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is greater than or equal to thevaluein this object.greaterThanOrEquals(FilterAttribute greaterThanOrEquals) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is greater than or equal to thevaluein this object.default RetrievalFilter.BuilderKnowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is in the list specified in thevaluein this object.in(FilterAttribute in) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is in the list specified in thevaluein this object.default RetrievalFilter.BuilderlessThan(Consumer<FilterAttribute.Builder> lessThan) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is less than thevaluein this object.lessThan(FilterAttribute lessThan) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is less than thevaluein this object.default RetrievalFilter.BuilderlessThanOrEquals(Consumer<FilterAttribute.Builder> lessThanOrEquals) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is less than or equal to thevaluein this object.lessThanOrEquals(FilterAttribute lessThanOrEquals) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is less than or equal to thevaluein this object.default RetrievalFilter.BuilderlistContains(Consumer<FilterAttribute.Builder> listContains) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is a list that contains thevalueas one of its members.listContains(FilterAttribute listContains) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is a list that contains thevalueas one of its members.default RetrievalFilter.BuildernotEquals(Consumer<FilterAttribute.Builder> notEquals) Knowledge base data sources are returned when:notEquals(FilterAttribute notEquals) Knowledge base data sources are returned when:default RetrievalFilter.BuildernotIn(Consumer<FilterAttribute.Builder> notIn) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value isn't in the list specified in thevaluein this object.notIn(FilterAttribute notIn) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value isn't in the list specified in thevaluein this object.orAll(Collection<RetrievalFilter> orAll) Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.orAll(Consumer<RetrievalFilter.Builder>... orAll) Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.orAll(RetrievalFilter... orAll) Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.default RetrievalFilter.BuilderstartsWith(Consumer<FilterAttribute.Builder> startsWith) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value starts with thevaluein this object.startsWith(FilterAttribute startsWith) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value starts with thevaluein this object.default RetrievalFilter.BuilderstringContains(Consumer<FilterAttribute.Builder> stringContains) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is one of the following:stringContains(FilterAttribute stringContains) Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is one of the following:Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
andAll
Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
- Parameters:
andAll- Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
andAll
Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
- Parameters:
andAll- Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
andAll
Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
This is a convenience method that creates an instance of theRetrievalFilter.Builderavoiding the need to create one manually viaRetrievalFilter.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toandAll(List<RetrievalFilter>).- Parameters:
andAll- a consumer that will call methods onRetrievalFilter.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
equalsValue
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value matches thevaluein this object.The following example would return data sources with an
animalattribute whose value iscat:"equals": { "key": "animal", "value": "cat" }- Parameters:
equalsValue- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value matches thevaluein this object.The following example would return data sources with an
animalattribute whose value iscat:"equals": { "key": "animal", "value": "cat" }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
equalsValue
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value matches thevaluein this object.The following example would return data sources with an
animalattribute whose value iscat:
This is a convenience method that creates an instance of the"equals": { "key": "animal", "value": "cat" }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toequalsValue(FilterAttribute).- Parameters:
equalsValue- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
greaterThan
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is greater than thevaluein this object.The following example would return data sources with an
yearattribute whose value is greater than1989:"greaterThan": { "key": "year", "value": 1989 }- Parameters:
greaterThan- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is greater than thevaluein this object.The following example would return data sources with an
yearattribute whose value is greater than1989:"greaterThan": { "key": "year", "value": 1989 }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
greaterThan
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is greater than thevaluein this object.The following example would return data sources with an
yearattribute whose value is greater than1989:
This is a convenience method that creates an instance of the"greaterThan": { "key": "year", "value": 1989 }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed togreaterThan(FilterAttribute).- Parameters:
greaterThan- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
greaterThanOrEquals
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is greater than or equal to thevaluein this object.The following example would return data sources with an
yearattribute whose value is greater than or equal to1989:"greaterThanOrEquals": { "key": "year", "value": 1989 }- Parameters:
greaterThanOrEquals- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is greater than or equal to thevaluein this object.The following example would return data sources with an
yearattribute whose value is greater than or equal to1989:"greaterThanOrEquals": { "key": "year", "value": 1989 }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
greaterThanOrEquals
default RetrievalFilter.Builder greaterThanOrEquals(Consumer<FilterAttribute.Builder> greaterThanOrEquals) Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is greater than or equal to thevaluein this object.The following example would return data sources with an
yearattribute whose value is greater than or equal to1989:
This is a convenience method that creates an instance of the"greaterThanOrEquals": { "key": "year", "value": 1989 }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed togreaterThanOrEquals(FilterAttribute).- Parameters:
greaterThanOrEquals- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
in
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is in the list specified in thevaluein this object.The following example would return data sources with an
animalattribute that is eithercatordog:"in": { "key": "animal", "value": ["cat", "dog"] }- Parameters:
in- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is in the list specified in thevaluein this object.The following example would return data sources with an
animalattribute that is eithercatordog:"in": { "key": "animal", "value": ["cat", "dog"] }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
in
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is in the list specified in thevaluein this object.The following example would return data sources with an
animalattribute that is eithercatordog:
This is a convenience method that creates an instance of the"in": { "key": "animal", "value": ["cat", "dog"] }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toin(FilterAttribute).- Parameters:
in- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
lessThan
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is less than thevaluein this object.The following example would return data sources with an
yearattribute whose value is less than to1989."lessThan": { "key": "year", "value": 1989 }- Parameters:
lessThan- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is less than thevaluein this object.The following example would return data sources with an
yearattribute whose value is less than to1989."lessThan": { "key": "year", "value": 1989 }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lessThan
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is less than thevaluein this object.The following example would return data sources with an
yearattribute whose value is less than to1989.
This is a convenience method that creates an instance of the"lessThan": { "key": "year", "value": 1989 }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tolessThan(FilterAttribute).- Parameters:
lessThan- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
lessThanOrEquals
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is less than or equal to thevaluein this object.The following example would return data sources with an
yearattribute whose value is less than or equal to1989."lessThanOrEquals": { "key": "year", "value": 1989 }- Parameters:
lessThanOrEquals- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is less than or equal to thevaluein this object.The following example would return data sources with an
yearattribute whose value is less than or equal to1989."lessThanOrEquals": { "key": "year", "value": 1989 }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lessThanOrEquals
default RetrievalFilter.Builder lessThanOrEquals(Consumer<FilterAttribute.Builder> lessThanOrEquals) Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is less than or equal to thevaluein this object.The following example would return data sources with an
yearattribute whose value is less than or equal to1989.
This is a convenience method that creates an instance of the"lessThanOrEquals": { "key": "year", "value": 1989 }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tolessThanOrEquals(FilterAttribute).- Parameters:
lessThanOrEquals- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
listContains
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is a list that contains thevalueas one of its members.The following example would return data sources with an
animalsattribute that is a list containing acatmember (for example["dog", "cat"])."listContains": { "key": "animals", "value": "cat" }- Parameters:
listContains- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is a list that contains thevalueas one of its members.The following example would return data sources with an
animalsattribute that is a list containing acatmember (for example["dog", "cat"])."listContains": { "key": "animals", "value": "cat" }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
listContains
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is a list that contains thevalueas one of its members.The following example would return data sources with an
animalsattribute that is a list containing acatmember (for example["dog", "cat"]).
This is a convenience method that creates an instance of the"listContains": { "key": "animals", "value": "cat" }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tolistContains(FilterAttribute).- Parameters:
listContains- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
notEquals
Knowledge base data sources are returned when:
-
It contains a metadata attribute whose name matches the
keyand whose value doesn't match thevaluein this object. -
The key is not present in the document.
The following example would return data sources that don't contain an
animalattribute whose value iscat."notEquals": { "key": "animal", "value": "cat" }- Parameters:
notEquals- Knowledge base data sources are returned when:-
It contains a metadata attribute whose name matches the
keyand whose value doesn't match thevaluein this object. -
The key is not present in the document.
The following example would return data sources that don't contain an
animalattribute whose value iscat."notEquals": { "key": "animal", "value": "cat" }-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
notEquals
Knowledge base data sources are returned when:
-
It contains a metadata attribute whose name matches the
keyand whose value doesn't match thevaluein this object. -
The key is not present in the document.
The following example would return data sources that don't contain an
animalattribute whose value iscat.
This is a convenience method that creates an instance of the"notEquals": { "key": "animal", "value": "cat" }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tonotEquals(FilterAttribute).- Parameters:
notEquals- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
notIn
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value isn't in the list specified in thevaluein this object.The following example would return data sources whose
animalattribute is neithercatnordog."notIn": { "key": "animal", "value": ["cat", "dog"] }- Parameters:
notIn- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value isn't in the list specified in thevaluein this object.The following example would return data sources whose
animalattribute is neithercatnordog."notIn": { "key": "animal", "value": ["cat", "dog"] }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
notIn
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value isn't in the list specified in thevaluein this object.The following example would return data sources whose
animalattribute is neithercatnordog.
This is a convenience method that creates an instance of the"notIn": { "key": "animal", "value": ["cat", "dog"] }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tonotIn(FilterAttribute).- Parameters:
notIn- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
orAll
Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
- Parameters:
orAll- Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
orAll
Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
- Parameters:
orAll- Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
orAll
Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
This is a convenience method that creates an instance of theRetrievalFilter.Builderavoiding the need to create one manually viaRetrievalFilter.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toorAll(List<RetrievalFilter>).- Parameters:
orAll- a consumer that will call methods onRetrievalFilter.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
startsWith
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value starts with thevaluein this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.The following example would return data sources with an
animalattribute starts withca(for example,catorcamel)."startsWith": { "key": "animal", "value": "ca" }- Parameters:
startsWith- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value starts with thevaluein this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.The following example would return data sources with an
animalattribute starts withca(for example,catorcamel)."startsWith": { "key": "animal", "value": "ca" }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
startsWith
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value starts with thevaluein this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.The following example would return data sources with an
animalattribute starts withca(for example,catorcamel).
This is a convenience method that creates an instance of the"startsWith": { "key": "animal", "value": "ca" }FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tostartsWith(FilterAttribute).- Parameters:
startsWith- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
stringContains
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is one of the following:-
A string that contains the
valueas a substring. The following example would return data sources with ananimalattribute that contains the substringat(for examplecat)."stringContains": { "key": "animal", "value": "at" } -
A list with a member that contains the
valueas a substring. The following example would return data sources with ananimalsattribute that is a list containing a member that contains the substringat(for example["dog", "cat"])."stringContains": { "key": "animals", "value": "at" }
- Parameters:
stringContains- Knowledge base data sources are returned if they contain a metadata attribute whose name matches thekeyand whose value is one of the following:-
A string that contains the
valueas a substring. The following example would return data sources with ananimalattribute that contains the substringat(for examplecat)."stringContains": { "key": "animal", "value": "at" } -
A list with a member that contains the
valueas a substring. The following example would return data sources with ananimalsattribute that is a list containing a member that contains the substringat(for example["dog", "cat"])."stringContains": { "key": "animals", "value": "at" }
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
stringContains
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the
keyand whose value is one of the following:-
A string that contains the
valueas a substring. The following example would return data sources with ananimalattribute that contains the substringat(for examplecat)."stringContains": { "key": "animal", "value": "at" } -
A list with a member that contains the
valueas a substring. The following example would return data sources with ananimalsattribute that is a list containing a member that contains the substringat(for example["dog", "cat"])."stringContains": { "key": "animals", "value": "at" }
FilterAttribute.Builderavoiding the need to create one manually viaFilterAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tostringContains(FilterAttribute).- Parameters:
stringContains- a consumer that will call methods onFilterAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-