Interface VectorStore

All Known Implementing Classes:
InMemoryVectorStore, MilvusVectorStore, Neo4jVectorStore, PgVectorStore, SimplePersistentVectorStore

public interface VectorStore
  • Method Details

    • add

      void add(List<Document> documents)
      Adds Documents to the vector store.
      Parameters:
      documents - the list of documents to store Will throw an exception if the underlying provider checks for duplicate IDs on add
    • delete

      Optional<Boolean> delete(List<String> idList)
    • similaritySearch

      List<Document> similaritySearch(String query)
    • similaritySearch

      List<Document> similaritySearch(String query, int k)
    • similaritySearch

      List<Document> similaritySearch(String query, int k, double threshold)
      Parameters:
      query - The query to send, it will be converted to an embedding based on the configuration of the vector store.
      k - the top 'k' similar results
      threshold - the lower bound of the similarity score
      Returns:
      similar documents