Class Neo4jVectorStore

java.lang.Object
org.springframework.ai.vectorstore.Neo4jVectorStore
All Implemented Interfaces:
VectorStore, org.springframework.beans.factory.InitializingBean

public class Neo4jVectorStore extends Object implements VectorStore, org.springframework.beans.factory.InitializingBean
Author:
Gerrit Meier, Michael Simons
  • Constructor Details

  • Method Details

    • add

      public void add(List<Document> documents)
      Description copied from interface: VectorStore
      Adds Documents to the vector store.
      Specified by:
      add in interface VectorStore
      Parameters:
      documents - the list of documents to store Will throw an exception if the underlying provider checks for duplicate IDs on add
    • delete

      public Optional<Boolean> delete(List<String> idList)
      Specified by:
      delete in interface VectorStore
    • similaritySearch

      public List<Document> similaritySearch(String query)
      Specified by:
      similaritySearch in interface VectorStore
    • similaritySearch

      public List<Document> similaritySearch(String query, int k)
      Specified by:
      similaritySearch in interface VectorStore
    • similaritySearch

      public List<Document> similaritySearch(String query, int k, double threshold)
      Specified by:
      similaritySearch in interface VectorStore
      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
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean