Skip to content

Milvus store filters on non-ASCII strings fail to parse聽#1782

Description

@edwinyyyu

What happens

Measured on main at ad8ff24 with MilvusVectorStore, records holding a string property s of 'plain', 'caf茅', and '馃榾', and a filter s = <value>:

value Milvus 2.6.24 Milvus Lite 3.2.1
'plain' matches matches
'caf茅' matches MilvusException: (code=6, message=unknown escape sequence \u at column 42
'馃榾' MilvusException: (code=1100, message=failed to create query plan: cannot parse expression: (partition_key == "str") && (_p_s == "馃榾"): invalid syntax: invalid parameter) MilvusException: (code=6, message=unknown escape sequence \u at column 39

Every comparison operator on such a string fails the same way, so a stored value holding a character outside the Basic Multilingual Plane (on Milvus Lite, any non-ASCII character) cannot be filtered on. SQLiteVectorStore, SQLiteVecVectorStore, and QdrantVectorStore match s = 'caf茅 馃榾' against the record holding it.

Why

The store renders a string literal with json.dumps(value) (packages/server/src/memmachine_server/common/vector_store/milvus_vector_store.py:71-73, used by _literal at :76-84). Its default ensure_ascii=True writes each non-ASCII character as a \uXXXX escape, and a character outside the Basic Multilingual Plane as a UTF-16 surrogate pair ("馃榾"). Milvus 2.6.24's expression parser accepts 茅 and refuses the surrogate pair; Milvus Lite refuses every \u escape.

Expected

A filter on any string value matches the records holding that value on Milvus and Milvus Lite, as on the other stores.

Fix

#1736 renders string literals with json.dumps(value, ensure_ascii=False), so characters reach Milvus as UTF-8.

馃 Written by Claude Code (Claude Opus 5.5) on behalf of @edwinyyyu.

Activity

  1. added theissue type on Oct 7, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions