Interface ExtendedVectorStore
- All Superinterfaces:
Consumer<List<org.springframework.ai.document.Document>>,org.springframework.ai.document.DocumentWriter,org.springframework.ai.vectorstore.VectorStore
- All Known Implementing Classes:
ExtendedMariaDBVectorStore,InMemoryVectorStore
public interface ExtendedVectorStore
extends org.springframework.ai.vectorstore.VectorStore
Adds more logic over default
VectorStore- Since:
- 9.2.2
- Author:
- Marco Meschieri - LogicalDOC
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.ai.vectorstore.VectorStore
org.springframework.ai.vectorstore.VectorStore.Builder<T extends org.springframework.ai.vectorstore.VectorStore.Builder<T>> -
Method Summary
Modifier and TypeMethodDescriptionintclear()Remove all embeddingsbooleanChecks the existence of a specific entry in the vector storefillDocumentMetadata(Map<String, Object> metadata, com.logicaldoc.core.document.Document document) Fills the given map with required metadata from the documentorg.springframework.ai.embedding.EmbeddingModelReturns theEmbeddingModelused by this storevoidupdateMetadata(com.logicaldoc.core.document.Document document) Updates the metadata of all the entries that refer to the given documentMethods inherited from interface org.springframework.ai.document.DocumentWriter
writeMethods inherited from interface org.springframework.ai.vectorstore.VectorStore
accept, add, delete, delete, delete, getName, getNativeClient, similaritySearch, similaritySearch
-
Method Details
-
exists
Checks the existence of a specific entry in the vector store- Parameters:
docId- Identifier of the documentfileVersion- Optional version specification- Returns:
- True only if there is at least one matching entry
-
getEmbeddingModel
org.springframework.ai.embedding.EmbeddingModel getEmbeddingModel()Returns theEmbeddingModelused by this store- Returns:
- the embedding model
-
updateMetadata
void updateMetadata(com.logicaldoc.core.document.Document document) Updates the metadata of all the entries that refer to the given document- Parameters:
document- The document to extract metadata from
-
clear
int clear()Remove all embeddings- Returns:
- number of removed embeddings
-
fillDocumentMetadata
static Map<String,Object> fillDocumentMetadata(Map<String, Object> metadata, com.logicaldoc.core.document.Document document) Fills the given map with required metadata from the document- Parameters:
metadata- The mapdocument- The document- Returns:
- the same map but filled
-