AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

QdrantVectorStore Numeric EQ/NE Filters Fail Or Crash Due To Int/Float Payload Mismatch

Metadata filters on numeric keys produce wrong results or throw ValidationError depending on whether the filter value is an int or float. EQ with int misses float payloads; NE with int returns everything; NE with float crashes because MatchExcept only accepts str/int. The bug originates in QdrantVectorStore._build_subfilter and affects any numeric metadata filtering.

highConfidence 95%Llama_indexWorkflowsDocument ProcessingVectorStoreIndexAffected V0.10.3

Origin Analysis

In QdrantVectorStore._build_subfilter, EQ maps int values to MatchValue (exact match) which does not match float payloads, while EQ maps float to Range. NE uses MatchExcept, which does not exclude float payloads for int input and fails validation for float input because MatchExcept except list only allows str/int.
1. Create QdrantVectorStore with in-memory client. 2. Add two nodes: one with metadata {'rate': 10.0}, another with {'rate': 20.0}. 3. Query with MetadataFilter(key='rate', operator=EQ, value=10) -> returns [] (expected [10.0]). 4. Query with EQ, value=10.0 -> returns [10.0]. 5. Query with NE, value=10 -> returns both nodes (expected only [20.0]). 6. Query with NE, value=10.0 -> raises pydantic ValidationError due to MatchExcept.

Fixing Code Block

Edge Case Audit

Boolean values are intentionally excluded from numeric range handling and fall back to MatchValue/must_not; verify Qdrant supports boolean match conditions in your version. The range approach assumes numeric payloads can be compared across int/float; confirm with your Qdrant server version. If unexpected behavior occurs, rollback by reverting to the original _build_subfilter from llama-index-vector-stores-qdrant 0.10.3. Performance may slightly degrade for numeric filters due to range scans instead of exact matches; monitor query times.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state