Class QdrantVectorStore.Builder

java.lang.Object
org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<QdrantVectorStore.Builder>
org.springframework.ai.vectorstore.qdrant.QdrantVectorStore.Builder
All Implemented Interfaces:
org.springframework.ai.vectorstore.VectorStore.Builder<QdrantVectorStore.Builder>
Enclosing class:
QdrantVectorStore

public static class QdrantVectorStore.Builder extends org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<QdrantVectorStore.Builder>
Builder for creating instances of QdrantVectorStore. This builder provides a fluent API for configuring all aspects of the vector store.
Since:
1.0.0
  • Field Summary

    Fields inherited from class org.springframework.ai.vectorstore.AbstractVectorStoreBuilder

    batchingStrategy, customObservationConvention, embeddingModel, observationRegistry
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds and returns a new QdrantVectorStore instance with the configured settings.
    collectionName(String collectionName)
    Configures the Qdrant collection name.
    initializeSchema(boolean initializeSchema)
    Configures whether to initialize the collection schema.

    Methods inherited from class org.springframework.ai.vectorstore.AbstractVectorStoreBuilder

    batchingStrategy, customObservationConvention, getBatchingStrategy, getCustomObservationConvention, getEmbeddingModel, getObservationRegistry, observationRegistry, self

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • collectionName

      public QdrantVectorStore.Builder collectionName(String collectionName)
      Configures the Qdrant collection name.
      Parameters:
      collectionName - the name of the collection to use (defaults to "vector_store")
      Returns:
      this builder instance
      Throws:
      IllegalArgumentException - if collectionName is null or empty
    • initializeSchema

      public QdrantVectorStore.Builder initializeSchema(boolean initializeSchema)
      Configures whether to initialize the collection schema.
      Parameters:
      initializeSchema - true to initialize schema automatically
      Returns:
      this builder instance
    • build

      public QdrantVectorStore build()
      Builds and returns a new QdrantVectorStore instance with the configured settings.
      Returns:
      a new QdrantVectorStore instance
      Throws:
      IllegalStateException - if the builder configuration is invalid