qdrant upsert 'collection not found' error
Fixes Qdrant upsert failing with collection not found. Use when upsert_points errors on a missing collection, when an agent writes before creating the collection, or when the collection name or client URL is wrong. Not for vector dimension errors, for auth failures, or for payload index issues.
TL;DR
Qdrant's upsert fails because the named collection doesnt exist on the server you connected to. Create the collection first with the right vector size and distance, verify the client URL points at the right Qdrant, and keep collection creation in the pipeline setup rather than assuming it exists.
qdrant upsert 'collection not found' errorUse this when
upsert_pointsfails with collection not found- An agent writes vectors before any setup step
- The error appears after changing the Qdrant URL or collection name
Not for this skill when
- Vectors are rejected on dimension (thats a size mismatch)
- The client cant reach the server (thats connection)
- Payload filtering misbehaves (thats indexing config)
Steps
- List collections on the server your client actually talks to:
print([c.name for c in client.get_collections().collections])Expected output: the real collection names. An empty list with a local file path client means the data dir is wrong or fresh.
- Create the collection with the vector config your embeddings need:
from qdrant_client.models import VectorParams, Distance
client.create_collection(
collection_name="docs",
vectors_config=VectorParams(size=1536, distance=Distance.COSINE),
)Expected output: the collection appears in the list. size must equal your embedding dimension exactly.
- Check the client URL. A local Qdrant and a Docker Qdrant are different servers:
print(client._client) # or check the url= / path= you passed inExpected output: you can see whether you are on the default local server port, a file path, or :memory:. Upserts to :memory: vanish when the process exits.
- Make collection setup explicit in the pipeline entrypoint:
if "docs" not in [c.name for c in client.get_collections().collections]:
client.create_collection("docs", vectors_config=VectorParams(size=1536, distance=Distance.COSINE))Expected output: the pipeline is idempotent; first run creates, later runs reuse. Dont rely on a manual setup step an agent will skip.
Variant phrasings
collection exists in dashboard but upsert says not found
The dashboard is looking at a different Qdrant instance than your client. Compare URLs.
worked with QdrantClient() and broke with QdrantClient(url=...)
You switched from in-memory/file mode to server mode (or vice versa). Collections dont transfer between modes.
Why it happens
Qdrant separates storage modes completely: in-memory, local file, and server each hold their own collections. Code that creates the collection in one mode and upserts in another sees an empty world. Agents generate the upsert call and the setup call independently, so the name, the mode, or the URL quietly disagree.
Edge cases
- Recreating a collection with a different vector size requires deleting it first; create is not upsert for collections.
- Collection names are case-sensitive.
- In cluster mode, a collection created on one node may take a moment to be visible; retry the upsert once before debugging further.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_fb-QP6wUddKHQyJh13-g4Q
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.