Package com.sap.ai.sdk.grounding.model
Class SearchFilter
java.lang.Object
com.sap.ai.sdk.grounding.model.SearchFilter
SearchFilter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_configuration(SearchConfiguration _configuration) Set the _configuration of thisSearchFilterinstance and return the same instance.addChunkMetadataItem(KeyValueListPair chunkMetadataItem) Add one chunkMetadata instance to thisSearchFilter.addCollectionIdsItem(String collectionIdsItem) Add one collectionIds instance to thisSearchFilter.addCollectionMetadataItem(KeyValueListPair collectionMetadataItem) Add one collectionMetadata instance to thisSearchFilter.addDocumentMetadataItem(SearchDocumentKeyValueListPair documentMetadataItem) Add one documentMetadata instance to thisSearchFilter.chunkMetadata(List<KeyValueListPair> chunkMetadata) Set the chunkMetadata of thisSearchFilterinstance and return the same instance.collectionIds(List<String> collectionIds) Set the collectionIds of thisSearchFilterinstance and return the same instance.collectionMetadata(List<KeyValueListPair> collectionMetadata) Set the collectionMetadata of thisSearchFilterinstance and return the same instance.static SearchFilter.Buildercreate()Create a type-safe, fluent-api builder object to construct a newSearchFilterinstance with all required arguments.documentMetadata(List<SearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisSearchFilterinstance and return the same instance.booleanRestrict 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 theSearchFilter.Restrict documents considered during search to those annotated with the given metadata.getId()Identifier of this SearchFilter - unique per request.inthashCode()Set the id of thisSearchFilterinstance and return the same instance.voidsetChunkMetadata(List<KeyValueListPair> chunkMetadata) Set the chunkMetadata of thisSearchFilterinstance.voidsetCollectionIds(List<String> collectionIds) Set the collectionIds of thisSearchFilterinstance.voidsetCollectionMetadata(List<KeyValueListPair> collectionMetadata) Set the collectionMetadata of thisSearchFilterinstance.voidsetConfiguration(SearchConfiguration _configuration) Set the _configuration of thisSearchFilterinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisSearchFilterinstance.voidsetDocumentMetadata(List<SearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisSearchFilterinstance.voidSet the id of thisSearchFilterinstance.toMap()Get the value of all properties of thisSearchFilterinstance including unrecognized properties.toString()
-
Constructor Details
-
SearchFilter
protected SearchFilter()Default constructor for SearchFilter.
-
-
Method Details
-
id
Set the id of thisSearchFilterinstance and return the same instance.- Parameters:
id- Identifier of this SearchFilter - unique per request.- Returns:
- The same instance of this
SearchFilterclass
-
getId
Identifier of this SearchFilter - unique per request.- Returns:
- id The id of this
SearchFilterinstance.
-
setId
Set the id of thisSearchFilterinstance.- Parameters:
id- Identifier of this SearchFilter - unique per request.
-
collectionIds
Set the collectionIds of thisSearchFilterinstance and return the same instance.- Parameters:
collectionIds- The collectionIds of thisSearchFilter- Returns:
- The same instance of this
SearchFilterclass
-
addCollectionIdsItem
Add one collectionIds instance to thisSearchFilter.- Parameters:
collectionIdsItem- The collectionIds that should be added- Returns:
- The same instance of type
SearchFilter
-
getCollectionIds
Get collectionIds- Returns:
- collectionIds The collectionIds of this
SearchFilterinstance.
-
setCollectionIds
Set the collectionIds of thisSearchFilterinstance.- Parameters:
collectionIds- The collectionIds of thisSearchFilter
-
_configuration
Set the _configuration of thisSearchFilterinstance and return the same instance.- Parameters:
_configuration- The _configuration of thisSearchFilter- Returns:
- The same instance of this
SearchFilterclass
-
getConfiguration
Get _configuration- Returns:
- _configuration The _configuration of this
SearchFilterinstance.
-
setConfiguration
Set the _configuration of thisSearchFilterinstance.- Parameters:
_configuration- The _configuration of thisSearchFilter
-
collectionMetadata
@Nonnull public SearchFilter collectionMetadata(@Nullable List<KeyValueListPair> collectionMetadata) Set the collectionMetadata of thisSearchFilterinstance 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
SearchFilterclass
-
addCollectionMetadataItem
@Nonnull public SearchFilter addCollectionMetadataItem(@Nonnull KeyValueListPair collectionMetadataItem) Add one collectionMetadata instance to thisSearchFilter.- Parameters:
collectionMetadataItem- The collectionMetadata that should be added- Returns:
- The same instance of type
SearchFilter
-
getCollectionMetadata
Restrict collections considered during search to those annotated with the given metadata. Useful when combined with collections=['*']- Returns:
- collectionMetadata The collectionMetadata of this
SearchFilterinstance.
-
setCollectionMetadata
Set the collectionMetadata of thisSearchFilterinstance.- Parameters:
collectionMetadata- Restrict collections considered during search to those annotated with the given metadata. Useful when combined with collections=['*']
-
documentMetadata
@Nonnull public SearchFilter documentMetadata(@Nullable List<SearchDocumentKeyValueListPair> documentMetadata) Set the documentMetadata of thisSearchFilterinstance 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
SearchFilterclass
-
addDocumentMetadataItem
@Nonnull public SearchFilter addDocumentMetadataItem(@Nonnull SearchDocumentKeyValueListPair documentMetadataItem) Add one documentMetadata instance to thisSearchFilter.- Parameters:
documentMetadataItem- The documentMetadata that should be added- Returns:
- The same instance of type
SearchFilter
-
getDocumentMetadata
Restrict documents considered during search to those annotated with the given metadata.- Returns:
- documentMetadata The documentMetadata of this
SearchFilterinstance.
-
setDocumentMetadata
Set the documentMetadata of thisSearchFilterinstance.- Parameters:
documentMetadata- Restrict documents considered during search to those annotated with the given metadata.
-
chunkMetadata
Set the chunkMetadata of thisSearchFilterinstance and return the same instance.- Parameters:
chunkMetadata- Restrict chunks considered during search to those with the given metadata.- Returns:
- The same instance of this
SearchFilterclass
-
addChunkMetadataItem
Add one chunkMetadata instance to thisSearchFilter.- Parameters:
chunkMetadataItem- The chunkMetadata that should be added- Returns:
- The same instance of type
SearchFilter
-
getChunkMetadata
Restrict chunks considered during search to those with the given metadata.- Returns:
- chunkMetadata The chunkMetadata of this
SearchFilterinstance.
-
setChunkMetadata
Set the chunkMetadata of thisSearchFilterinstance.- Parameters:
chunkMetadata- Restrict chunks considered during search to those with the given metadata.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theSearchFilter.- 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 thisSearchFilterinstance.- 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 thisSearchFilterinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisSearchFilterinstance. 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 newSearchFilterinstance with all required arguments.
-
toMap()instead.