Class QdrantVectorStore

java.lang.Object
com.google.genkit.plugins.qdrant.QdrantVectorStore

public final class QdrantVectorStore extends Object
Qdrant vector store backed by the Qdrant REST API.

Indexes documents (embedding + payload holding the text and metadata) into a Qdrant collection and retrieves the nearest neighbors of a query embedding.

  • Constructor Details

    • QdrantVectorStore

      public QdrantVectorStore(String baseUrl, String apiKey, QdrantCollectionConfig config, Embedder embedder)
      Creates a new store.
      Parameters:
      baseUrl - the Qdrant server base URL (e.g. http://localhost:6333)
      apiKey - the Qdrant API key, or null when the server requires none
      config - the collection configuration
      embedder - the embedder used to vectorize documents and queries
  • Method Details

    • retrieve

      public RetrieverResponse retrieve(ActionContext context, RetrieverRequest request)
      Retrieves documents similar to the query.
      Parameters:
      context - the action context
      request - the retriever request
      Returns:
      the retriever response with matching documents
    • index

      public IndexerResponse index(ActionContext context, IndexerRequest request)
      Indexes documents into the collection, generating an embedding for each.
      Parameters:
      context - the action context
      request - the indexer request
      Returns:
      the indexer response