Package com.sap.ai.sdk.grounding.model
Class RetrievalSearchFilter
java.lang.Object
com.sap.ai.sdk.grounding.model.RetrievalSearchFilter
Limit scope of search to certain DataRepositories, Documents or Chunks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for RetrievalSearchFilter. -
Method Summary
Modifier and TypeMethodDescriptionaddChunkMetadataItem(RetrievalKeyValueListPair chunkMetadataItem) Add one chunkMetadata instance to thisRetrievalSearchFilter.addDataRepositoriesItem(String dataRepositoriesItem) Add one dataRepositories instance to thisRetrievalSearchFilter.addDataRepositoryMetadataItem(RetrievalKeyValueListPair dataRepositoryMetadataItem) Add one dataRepositoryMetadata instance to thisRetrievalSearchFilter.addDocumentMetadataItem(RetrievalSearchDocumentKeyValueListPair documentMetadataItem) Add one documentMetadata instance to thisRetrievalSearchFilter.chunkMetadata(List<RetrievalKeyValueListPair> chunkMetadata) Set the chunkMetadata of thisRetrievalSearchFilterinstance and return the same instance.create()Create a type-safe, fluent-api builder object to construct a newRetrievalSearchFilterinstance with all required arguments.dataRepositories(List<String> dataRepositories) Set the dataRepositories of thisRetrievalSearchFilterinstance and return the same instance.dataRepositoryMetadata(List<RetrievalKeyValueListPair> dataRepositoryMetadata) Set the dataRepositoryMetadata of thisRetrievalSearchFilterinstance and return the same instance.dataRepositoryType(DataRepositoryType dataRepositoryType) Set the dataRepositoryType of thisRetrievalSearchFilterinstance and return the same instance.documentMetadata(List<RetrievalSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisRetrievalSearchFilterinstance and return the same instance.booleanRestrict chunks considered during search to those with the given metadata.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theRetrievalSearchFilter.Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.Restrict DataRepositories considered during search to those annotated with the given metadata.Get dataRepositoryTypeRestrict documents considered during search to those annotated with the given metadata.getId()Identifier of this RetrievalSearchFilter - unique per request.Destination Name of remote instance.Get searchConfigurationinthashCode()Set the id of thisRetrievalSearchFilterinstance and return the same instance.remoteName(String remoteName) Set the remoteName of thisRetrievalSearchFilterinstance and return the same instance.searchConfiguration(RetrievalSearchConfiguration searchConfiguration) Set the searchConfiguration of thisRetrievalSearchFilterinstance and return the same instance.voidsetChunkMetadata(List<RetrievalKeyValueListPair> chunkMetadata) Set the chunkMetadata of thisRetrievalSearchFilterinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisRetrievalSearchFilterinstance.voidsetDataRepositories(List<String> dataRepositories) Set the dataRepositories of thisRetrievalSearchFilterinstance.voidsetDataRepositoryMetadata(List<RetrievalKeyValueListPair> dataRepositoryMetadata) Set the dataRepositoryMetadata of thisRetrievalSearchFilterinstance.voidsetDataRepositoryType(DataRepositoryType dataRepositoryType) Set the dataRepositoryType of thisRetrievalSearchFilterinstance.voidsetDocumentMetadata(List<RetrievalSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisRetrievalSearchFilterinstance.voidSet the id of thisRetrievalSearchFilterinstance.voidsetRemoteName(String remoteName) Set the remoteName of thisRetrievalSearchFilterinstance.voidsetSearchConfiguration(RetrievalSearchConfiguration searchConfiguration) Set the searchConfiguration of thisRetrievalSearchFilterinstance.toMap()Get the value of all properties of thisRetrievalSearchFilterinstance including unrecognized properties.toString()
-
Constructor Details
-
RetrievalSearchFilter
protected RetrievalSearchFilter()Default constructor for RetrievalSearchFilter.
-
-
Method Details
-
id
Set the id of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
id- Identifier of this RetrievalSearchFilter - unique per request.- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
getId
Identifier of this RetrievalSearchFilter - unique per request.- Returns:
- id The id of this
RetrievalSearchFilterinstance.
-
setId
Set the id of thisRetrievalSearchFilterinstance.- Parameters:
id- Identifier of this RetrievalSearchFilter - unique per request.
-
searchConfiguration
@Nonnull public RetrievalSearchFilter searchConfiguration(@Nullable RetrievalSearchConfiguration searchConfiguration) Set the searchConfiguration of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
searchConfiguration- The searchConfiguration of thisRetrievalSearchFilter- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
getSearchConfiguration
Get searchConfiguration- Returns:
- searchConfiguration The searchConfiguration of this
RetrievalSearchFilterinstance.
-
setSearchConfiguration
Set the searchConfiguration of thisRetrievalSearchFilterinstance.- Parameters:
searchConfiguration- The searchConfiguration of thisRetrievalSearchFilter
-
dataRepositories
Set the dataRepositories of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
dataRepositories- Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
addDataRepositoriesItem
Add one dataRepositories instance to thisRetrievalSearchFilter.- Parameters:
dataRepositoriesItem- The dataRepositories that should be added- Returns:
- The same instance of type
RetrievalSearchFilter
-
getDataRepositories
Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.- Returns:
- dataRepositories The dataRepositories of this
RetrievalSearchFilterinstance.
-
setDataRepositories
Set the dataRepositories of thisRetrievalSearchFilterinstance.- Parameters:
dataRepositories- Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.
-
dataRepositoryType
@Nonnull public RetrievalSearchFilter dataRepositoryType(@Nonnull DataRepositoryType dataRepositoryType) Set the dataRepositoryType of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
dataRepositoryType- The dataRepositoryType of thisRetrievalSearchFilter- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
getDataRepositoryType
Get dataRepositoryType- Returns:
- dataRepositoryType The dataRepositoryType of this
RetrievalSearchFilterinstance.
-
setDataRepositoryType
Set the dataRepositoryType of thisRetrievalSearchFilterinstance.- Parameters:
dataRepositoryType- The dataRepositoryType of thisRetrievalSearchFilter
-
remoteName
Set the remoteName of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
remoteName- Destination Name of remote instance.- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
getRemoteName
Destination Name of remote instance.- Returns:
- remoteName The remoteName of this
RetrievalSearchFilterinstance.
-
setRemoteName
Set the remoteName of thisRetrievalSearchFilterinstance.- Parameters:
remoteName- Destination Name of remote instance.
-
dataRepositoryMetadata
@Nonnull public RetrievalSearchFilter dataRepositoryMetadata(@Nullable List<RetrievalKeyValueListPair> dataRepositoryMetadata) Set the dataRepositoryMetadata of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
dataRepositoryMetadata- Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
addDataRepositoryMetadataItem
@Nonnull public RetrievalSearchFilter addDataRepositoryMetadataItem(@Nonnull RetrievalKeyValueListPair dataRepositoryMetadataItem) Add one dataRepositoryMetadata instance to thisRetrievalSearchFilter.- Parameters:
dataRepositoryMetadataItem- The dataRepositoryMetadata that should be added- Returns:
- The same instance of type
RetrievalSearchFilter
-
getDataRepositoryMetadata
Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']- Returns:
- dataRepositoryMetadata The dataRepositoryMetadata of this
RetrievalSearchFilterinstance.
-
setDataRepositoryMetadata
public void setDataRepositoryMetadata(@Nullable List<RetrievalKeyValueListPair> dataRepositoryMetadata) Set the dataRepositoryMetadata of thisRetrievalSearchFilterinstance.- Parameters:
dataRepositoryMetadata- Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']
-
documentMetadata
@Nonnull public RetrievalSearchFilter documentMetadata(@Nullable List<RetrievalSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisRetrievalSearchFilterinstance 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
RetrievalSearchFilterclass
-
addDocumentMetadataItem
@Nonnull public RetrievalSearchFilter addDocumentMetadataItem(@Nonnull RetrievalSearchDocumentKeyValueListPair documentMetadataItem) Add one documentMetadata instance to thisRetrievalSearchFilter.- Parameters:
documentMetadataItem- The documentMetadata that should be added- Returns:
- The same instance of type
RetrievalSearchFilter
-
getDocumentMetadata
Restrict documents considered during search to those annotated with the given metadata.- Returns:
- documentMetadata The documentMetadata of this
RetrievalSearchFilterinstance.
-
setDocumentMetadata
public void setDocumentMetadata(@Nullable List<RetrievalSearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisRetrievalSearchFilterinstance.- Parameters:
documentMetadata- Restrict documents considered during search to those annotated with the given metadata.
-
chunkMetadata
@Nonnull public RetrievalSearchFilter chunkMetadata(@Nullable List<RetrievalKeyValueListPair> chunkMetadata) Set the chunkMetadata of thisRetrievalSearchFilterinstance and return the same instance.- Parameters:
chunkMetadata- Restrict chunks considered during search to those with the given metadata.- Returns:
- The same instance of this
RetrievalSearchFilterclass
-
addChunkMetadataItem
@Nonnull public RetrievalSearchFilter addChunkMetadataItem(@Nonnull RetrievalKeyValueListPair chunkMetadataItem) Add one chunkMetadata instance to thisRetrievalSearchFilter.- Parameters:
chunkMetadataItem- The chunkMetadata that should be added- Returns:
- The same instance of type
RetrievalSearchFilter
-
getChunkMetadata
Restrict chunks considered during search to those with the given metadata.- Returns:
- chunkMetadata The chunkMetadata of this
RetrievalSearchFilterinstance.
-
setChunkMetadata
Set the chunkMetadata of thisRetrievalSearchFilterinstance.- Parameters:
chunkMetadata- Restrict chunks considered during search to those with the given metadata.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theRetrievalSearchFilter.- 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 thisRetrievalSearchFilterinstance.- 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 thisRetrievalSearchFilterinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisRetrievalSearchFilterinstance. 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 newRetrievalSearchFilterinstance with all required arguments.
-
toMap()instead.