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 Type
    Method
    Description
    int
    Remove all embeddings
    boolean
    exists(long docId, String fileVersion)
    Checks the existence of a specific entry in the vector store
    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
    org.springframework.ai.embedding.EmbeddingModel
    Returns the EmbeddingModel used by this store
    void
    updateMetadata(com.logicaldoc.core.document.Document document)
    Updates the metadata of all the entries that refer to the given document

    Methods inherited from interface java.util.function.Consumer

    andThen

    Methods inherited from interface org.springframework.ai.document.DocumentWriter

    write

    Methods inherited from interface org.springframework.ai.vectorstore.VectorStore

    accept, add, delete, delete, delete, getName, getNativeClient, similaritySearch, similaritySearch
  • Method Details

    • exists

      boolean exists(long docId, String fileVersion)
      Checks the existence of a specific entry in the vector store
      Parameters:
      docId - Identifier of the document
      fileVersion - Optional version specification
      Returns:
      True only if there is at least one matching entry
    • getEmbeddingModel

      org.springframework.ai.embedding.EmbeddingModel getEmbeddingModel()
      Returns the EmbeddingModel used 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 map
      document - The document
      Returns:
      the same map but filled