Skip to content

Local mode: wrong-kind query vector reports the named vector as 'not found' (e.g. 1-D query against a multivector) #1444

Description

@warter666

What happened?

In local mode, querying a collection with a vector of the wrong kind for the named vector produces a misleading ValueError.

When a collection has a named multivector and the query is a 1-D vector (or vice versa: a 2-D query against a dense named vector), the validation falls into the wrong branch and raises:

Dense vector mv is not found in the collection        # 'mv' is a multivector, 1-D query given
Multivector  is not found in the collection           # unnamed dense collection, 2-D query given

The vector does exist — the query format is wrong. The message even shows an empty name in the unnamed case, which makes debugging worse.

Reproduction (local mode, qdrant-client main)

from qdrant_client import QdrantClient, models

client = QdrantClient(path=":memory:")
client.create_collection("m", vectors_config={
    "mv": models.VectorParams(size=2, distance=models.Distance.COSINE,
        multivector_config=models.MultiVectorConfig(comparator=models.MultiVectorComparator.MAX_SIM))})
client.upsert("m", points=[models.PointStruct(id=1, vector={"mv": [[1.0, 0.0]]})])

client.query_points("m", query=[1.0, 0.0], using="mv", limit=5)
# ValueError: Dense vector mv is not found in the collection  <- misleading

Server-side correctly requires a 2-D query for multivector collections (per the docs), so the local rejection itself is right — the error is just wrong about the reason.

Suggested fix

When the named vector exists but as a different kind, raise an error that says so:

Vector 'mv' is a multivector vector, but the query vector is a single vector (1-D).
A multivector collection requires a matching query format.

Truly missing names keep the original "not found" message. Happy to open a PR with the fix + tests.

Activity

  1. added 2 commits that reference this issue on Sep 16, 2026
    88a7a15
    87a5c3b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions