Package com.sap.ai.sdk.grounding.model
Class VectorSearchFilter
java.lang.Object
com.sap.ai.sdk.grounding.model.VectorSearchFilter
VectorSearchFilter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for VectorSearchFilter. -
Method Summary
Modifier and TypeMethodDescription_configuration(VectorSearchConfiguration _configuration) Set the _configuration of thisVectorSearchFilterinstance and return the same instance.addChunkMetadataItem(VectorKeyValueListPair chunkMetadataItem) Add one chunkMetadata instance to thisVectorSearchFilter.addCollectionIdsItem(String collectionIdsItem) Add one collectionIds instance to thisVectorSearchFilter.addCollectionMetadataItem(VectorKeyValueListPair collectionMetadataItem) Add one collectionMetadata instance to thisVectorSearchFilter.addDocumentMetadataItem(VectorSearchDocumentKeyValueListPair documentMetadataItem) Add one documentMetadata instance to thisVectorSearchFilter.chunkMetadata(List<VectorKeyValueListPair> chunkMetadata) Set the chunkMetadata of thisVectorSearchFilterinstance and return the same instance.collectionIds(List<String> collectionIds) Set the collectionIds of thisVectorSearchFilterinstance and return the same instance.collectionMetadata(List<VectorKeyValueListPair> collectionMetadata) Set the collectionMetadata of thisVectorSearchFilterinstance and return the same instance.static VectorSearchFilter.Buildercreate()Create a type-safe, fluent-api builder object to construct a newVectorSearchFilterinstance with all required arguments.documentMetadata(List<VectorSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisVectorSearchFilterinstance and return the same instance.booleanSet the filter of thisVectorSearchFilterinstance and return the same instance.Restrict chunks considered during search to those with the given metadata.Get collectionIdsRestrict collections considered during search to those annotated with the given metadata.Get _configurationgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theVectorSearchFilter.Restrict documents considered during search to those annotated with the given metadata.Get filtergetId()Identifier of this VectorSearchFilter - unique per request.inthashCode()Set the id of thisVectorSearchFilterinstance and return the same instance.voidsetChunkMetadata(List<VectorKeyValueListPair> chunkMetadata) Set the chunkMetadata of thisVectorSearchFilterinstance.voidsetCollectionIds(List<String> collectionIds) Set the collectionIds of thisVectorSearchFilterinstance.voidsetCollectionMetadata(List<VectorKeyValueListPair> collectionMetadata) Set the collectionMetadata of thisVectorSearchFilterinstance.voidsetConfiguration(VectorSearchConfiguration _configuration) Set the _configuration of thisVectorSearchFilterinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisVectorSearchFilterinstance.voidsetDocumentMetadata(List<VectorSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisVectorSearchFilterinstance.voidSet the filter of thisVectorSearchFilterinstance.voidSet the id of thisVectorSearchFilterinstance.toMap()Get the value of all properties of thisVectorSearchFilterinstance including unrecognized properties.toString()
-
Constructor Details
-
VectorSearchFilter
protected VectorSearchFilter()Default constructor for VectorSearchFilter.
-
-
Method Details
-
id
Set the id of thisVectorSearchFilterinstance and return the same instance.- Parameters:
id- Identifier of this VectorSearchFilter - unique per request.- Returns:
- The same instance of this
VectorSearchFilterclass
-
getId
Identifier of this VectorSearchFilter - unique per request.- Returns:
- id The id of this
VectorSearchFilterinstance.
-
setId
Set the id of thisVectorSearchFilterinstance.- Parameters:
id- Identifier of this VectorSearchFilter - unique per request.
-
collectionIds
Set the collectionIds of thisVectorSearchFilterinstance and return the same instance.- Parameters:
collectionIds- The collectionIds of thisVectorSearchFilter- Returns:
- The same instance of this
VectorSearchFilterclass
-
addCollectionIdsItem
Add one collectionIds instance to thisVectorSearchFilter.- Parameters:
collectionIdsItem- The collectionIds that should be added- Returns:
- The same instance of type
VectorSearchFilter
-
getCollectionIds
Get collectionIds- Returns:
- collectionIds The collectionIds of this
VectorSearchFilterinstance.
-
setCollectionIds
Set the collectionIds of thisVectorSearchFilterinstance.- Parameters:
collectionIds- The collectionIds of thisVectorSearchFilter
-
_configuration
@Nonnull public VectorSearchFilter _configuration(@Nonnull VectorSearchConfiguration _configuration) Set the _configuration of thisVectorSearchFilterinstance and return the same instance.- Parameters:
_configuration- The _configuration of thisVectorSearchFilter- Returns:
- The same instance of this
VectorSearchFilterclass
-
getConfiguration
Get _configuration- Returns:
- _configuration The _configuration of this
VectorSearchFilterinstance.
-
setConfiguration
Set the _configuration of thisVectorSearchFilterinstance.- Parameters:
_configuration- The _configuration of thisVectorSearchFilter
-
collectionMetadata
@Nonnull public VectorSearchFilter collectionMetadata(@Nullable List<VectorKeyValueListPair> collectionMetadata) Set the collectionMetadata of thisVectorSearchFilterinstance and return the same instance.- Parameters:
collectionMetadata- Restrict collections considered during search to those annotated with the given metadata. Useful when combined with collections=['*']- Returns:
- The same instance of this
VectorSearchFilterclass
-
addCollectionMetadataItem
@Nonnull public VectorSearchFilter addCollectionMetadataItem(@Nonnull VectorKeyValueListPair collectionMetadataItem) Add one collectionMetadata instance to thisVectorSearchFilter.- Parameters:
collectionMetadataItem- The collectionMetadata that should be added- Returns:
- The same instance of type
VectorSearchFilter
-
getCollectionMetadata
Restrict collections considered during search to those annotated with the given metadata. Useful when combined with collections=['*']- Returns:
- collectionMetadata The collectionMetadata of this
VectorSearchFilterinstance.
-
setCollectionMetadata
Set the collectionMetadata of thisVectorSearchFilterinstance.- Parameters:
collectionMetadata- Restrict collections considered during search to those annotated with the given metadata. Useful when combined with collections=['*']
-
documentMetadata
@Nonnull public VectorSearchFilter documentMetadata(@Nullable List<VectorSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisVectorSearchFilterinstance and return the same instance.- Parameters:
documentMetadata- Restrict documents considered during search to those annotated with the given metadata.- Returns:
- The same instance of this
VectorSearchFilterclass
-
addDocumentMetadataItem
@Nonnull public VectorSearchFilter addDocumentMetadataItem(@Nonnull VectorSearchDocumentKeyValueListPair documentMetadataItem) Add one documentMetadata instance to thisVectorSearchFilter.- Parameters:
documentMetadataItem- The documentMetadata that should be added- Returns:
- The same instance of type
VectorSearchFilter
-
getDocumentMetadata
Restrict documents considered during search to those annotated with the given metadata.- Returns:
- documentMetadata The documentMetadata of this
VectorSearchFilterinstance.
-
setDocumentMetadata
public void setDocumentMetadata(@Nullable List<VectorSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisVectorSearchFilterinstance.- Parameters:
documentMetadata- Restrict documents considered during search to those annotated with the given metadata.
-
chunkMetadata
@Nonnull public VectorSearchFilter chunkMetadata(@Nullable List<VectorKeyValueListPair> chunkMetadata) Set the chunkMetadata of thisVectorSearchFilterinstance and return the same instance.- Parameters:
chunkMetadata- Restrict chunks considered during search to those with the given metadata.- Returns:
- The same instance of this
VectorSearchFilterclass
-
addChunkMetadataItem
@Nonnull public VectorSearchFilter addChunkMetadataItem(@Nonnull VectorKeyValueListPair chunkMetadataItem) Add one chunkMetadata instance to thisVectorSearchFilter.- Parameters:
chunkMetadataItem- The chunkMetadata that should be added- Returns:
- The same instance of type
VectorSearchFilter
-
getChunkMetadata
Restrict chunks considered during search to those with the given metadata.- Returns:
- chunkMetadata The chunkMetadata of this
VectorSearchFilterinstance.
-
setChunkMetadata
Set the chunkMetadata of thisVectorSearchFilterinstance.- Parameters:
chunkMetadata- Restrict chunks considered during search to those with the given metadata.
-
filter
Set the filter of thisVectorSearchFilterinstance and return the same instance.- Parameters:
filter- The filter of thisVectorSearchFilter- Returns:
- The same instance of this
VectorSearchFilterclass
-
getFilter
Get filter- Returns:
- filter The filter of this
VectorSearchFilterinstance.
-
setFilter
Set the filter of thisVectorSearchFilterinstance.- Parameters:
filter- The filter of thisVectorSearchFilter
-
getCustomFieldNames
Get the names of the unrecognizable properties of theVectorSearchFilter.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisVectorSearchFilterinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisVectorSearchFilterinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisVectorSearchFilterinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newVectorSearchFilterinstance with all required arguments.
-
toMap()instead.