Class CockroachDBVectorStore

java.lang.Object
com.cockroachlabs.data.ai.springai.CockroachDBVectorStore
All Implemented Interfaces:
Consumer<List<org.springframework.ai.document.Document>>, org.springframework.ai.document.DocumentWriter, org.springframework.ai.vectorstore.VectorStore, org.springframework.ai.vectorstore.VectorStoreRetriever

public class CockroachDBVectorStore extends Object implements org.springframework.ai.vectorstore.VectorStore
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(List<org.springframework.ai.document.Document> documents)
     
    void
     
    builder(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.ai.embedding.EmbeddingModel embeddingModel)
     
    void
    delete(List<String> idList)
     
    void
    delete(org.springframework.ai.vectorstore.filter.Filter.Expression filterExpression)
     
     
    <T> Optional<T>
     
    List<org.springframework.ai.document.Document>
    similaritySearch(org.springframework.ai.vectorstore.SearchRequest request)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    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, delete

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

    similaritySearch
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
    • add

      public void add(List<org.springframework.ai.document.Document> documents)
      Specified by:
      add in interface org.springframework.ai.vectorstore.VectorStore
    • delete

      public void delete(List<String> idList)
      Specified by:
      delete in interface org.springframework.ai.vectorstore.VectorStore
    • delete

      public void delete(org.springframework.ai.vectorstore.filter.Filter.Expression filterExpression)
      Specified by:
      delete in interface org.springframework.ai.vectorstore.VectorStore
    • similaritySearch

      public List<org.springframework.ai.document.Document> similaritySearch(org.springframework.ai.vectorstore.SearchRequest request)
      Specified by:
      similaritySearch in interface org.springframework.ai.vectorstore.VectorStoreRetriever
    • getName

      public String getName()
      Specified by:
      getName in interface org.springframework.ai.vectorstore.VectorStore
    • getNativeClient

      public <T> Optional<T> getNativeClient()
      Specified by:
      getNativeClient in interface org.springframework.ai.vectorstore.VectorStore
    • builder

      public static CockroachDBVectorStore.Builder builder(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.ai.embedding.EmbeddingModel embeddingModel)