Skip to content
ProvidersQdrant

Qdrant

Reference for the Qdrant adapter, which wraps QdrantClient, hashes ids to UUIDs, and emulates namespaces with a payload key.

The Qdrant adapter wraps a QdrantClient from @qdrant/js-client-rest. An index is a collection.

import { QdrantClient } from "@qdrant/js-client-rest";
import { createQdrantStore } from "vecstore-sdk/qdrant";

const store = createQdrantStore({
  client: new QdrantClient({ url, apiKey }),
});

Install the client alongside the SDK:

bun add vecstore-sdk @qdrant/js-client-rest

Ids

Qdrant accepts only UUID (universally unique identifier) or integer point ids. The adapter hashes any other id to a deterministic UUID and stores your id in the _id payload key. A lowercase UUID id in the default namespace passes through unchanged, unless it is a version 8 UUID, the version the adapter's own hashed ids use. Those are hashed too, so a raw id can never collide with a hashed one.

A namespace cannot contain /, because the adapter joins the namespace and the id when it hashes a point id, and upsert rejects a record whose metadata sets _id or _namespace. Both return invalid_argument. upsert sends 500 points per request, and fetch and delete({ ids }) send 1,000 ids per request.

Namespaces

Namespaces live in the _namespace payload key. createIndex adds a tenant keyword index on that key. The adapter strips _id and _namespace from the metadata it returns.

What the adapter stores

ConcernQdrant
IndexCollection
Namespace_namespace payload key
IdUUID, hashed from your id when needed. The original id is kept in _id.
MetadataPayload
MetricSet on the collection

A collection with the cosine metric stores each vector normalized to unit length, so fetch and query with includeVector return the normalized vector, not the one you wrote. Normalize before you compare vectors, or before you copy them into a dot or euclidean index elsewhere.

If you read a collection with another tool, expect the _id and _namespace keys in the payload.

On this page