Interface RetrievalFilter.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<RetrievalFilter.Builder,RetrievalFilter>,SdkBuilder<RetrievalFilter.Builder,RetrievalFilter>,SdkPojo
- Enclosing class:
- RetrievalFilter
@Mutable @NotThreadSafe public static interface RetrievalFilter.Builder extends SdkPojo, CopyableBuilder<RetrievalFilter.Builder,RetrievalFilter>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RetrievalFilter.BuilderandAll(Collection<RetrievalFilter> andAll)Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.RetrievalFilter.BuilderandAll(Consumer<RetrievalFilter.Builder>... andAll)Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.RetrievalFilter.BuilderandAll(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.RetrievalFilter.BuilderequalsValue(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.RetrievalFilter.BuildergreaterThan(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.RetrievalFilter.BuildergreaterThanOrEquals(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.Builderin(Consumer<FilterAttribute.Builder> 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.RetrievalFilter.Builderin(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.RetrievalFilter.BuilderlessThan(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.RetrievalFilter.BuilderlessThanOrEquals(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.RetrievalFilter.BuilderlistContains(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:RetrievalFilter.BuildernotEquals(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.RetrievalFilter.BuildernotIn(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.RetrievalFilter.BuilderorAll(Collection<RetrievalFilter> orAll)Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.RetrievalFilter.BuilderorAll(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.RetrievalFilter.BuilderorAll(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.RetrievalFilter.BuilderstartsWith(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:RetrievalFilter.BuilderstringContains(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
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
andAll
RetrievalFilter.Builder andAll(Collection<RetrievalFilter> 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
RetrievalFilter.Builder andAll(RetrievalFilter... 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
RetrievalFilter.Builder andAll(Consumer<RetrievalFilter.Builder>... 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 to#andAll(List.) - 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:
#andAll(java.util.Collection)
-
equalsValue
RetrievalFilter.Builder equalsValue(FilterAttribute 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
default RetrievalFilter.Builder equalsValue(Consumer<FilterAttribute.Builder> 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:
equalsValue(FilterAttribute)
-
greaterThan
RetrievalFilter.Builder greaterThan(FilterAttribute 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
default RetrievalFilter.Builder greaterThan(Consumer<FilterAttribute.Builder> 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:
greaterThan(FilterAttribute)
-
greaterThanOrEquals
RetrievalFilter.Builder greaterThanOrEquals(FilterAttribute 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:
greaterThanOrEquals(FilterAttribute)
-
in
RetrievalFilter.Builder in(FilterAttribute 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
default RetrievalFilter.Builder in(Consumer<FilterAttribute.Builder> 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:
in(FilterAttribute)
-
lessThan
RetrievalFilter.Builder lessThan(FilterAttribute 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
default RetrievalFilter.Builder lessThan(Consumer<FilterAttribute.Builder> 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:
lessThan(FilterAttribute)
-
lessThanOrEquals
RetrievalFilter.Builder lessThanOrEquals(FilterAttribute 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:
lessThanOrEquals(FilterAttribute)
-
listContains
RetrievalFilter.Builder listContains(FilterAttribute 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
default RetrievalFilter.Builder listContains(Consumer<FilterAttribute.Builder> 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:
listContains(FilterAttribute)
-
notEquals
RetrievalFilter.Builder notEquals(FilterAttribute 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
default RetrievalFilter.Builder notEquals(Consumer<FilterAttribute.Builder> 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:
notEquals(FilterAttribute)
-
-
notIn
RetrievalFilter.Builder notIn(FilterAttribute 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
default RetrievalFilter.Builder notIn(Consumer<FilterAttribute.Builder> 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:
notIn(FilterAttribute)
-
orAll
RetrievalFilter.Builder 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.
- 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
RetrievalFilter.Builder orAll(RetrievalFilter... 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
RetrievalFilter.Builder 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.
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 to#orAll(List.) - 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:
#orAll(java.util.Collection)
-
startsWith
RetrievalFilter.Builder startsWith(FilterAttribute 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
default RetrievalFilter.Builder startsWith(Consumer<FilterAttribute.Builder> 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:
startsWith(FilterAttribute)
-
stringContains
RetrievalFilter.Builder stringContains(FilterAttribute 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
default RetrievalFilter.Builder stringContains(Consumer<FilterAttribute.Builder> 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:
stringContains(FilterAttribute)
-
-
-