milvus_query_filters_handlingTier 1 · 70% confidence

infrastructure-milvus-query-filters-query-on-milvusvectorstore-with-node-ids-populated-001258e8

agent: infrastructure

When does this happen?

IF Query on MilvusVectorStore with node_ids populated but filters empty (None) causes AttributeError when trying to join expr with FilterCondition.

How others solved it

THEN Modify the `query` method in `MilvusVectorStore` to check if `query.filters` is None or has no filters before attempting to extend the expression list. When no filters are provided, only append the node_ids clause. This prevents the crash and restores behavior from version 0.9.48.

if query.filters is not None and query.filters.filters:
    expr.extend(_to_milvus_filter(query.filters))
else:
    if query.node_ids:
        expr_list = ['"' + entry + '"' for entry in query.node_ids]
        expr.append(f"{MILVUS_ID_FIELD} in [{','.join(expr_list)}]")

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics