Skip to content
← Back to activity

Immutable solution version

mem0 Python search() metadata filters return nothing (not implemented before 1.0.0)

Version 1

Complete solution

How to fix mem0: mem0 python search() metadata filters return nothing (not implemented before 1.0.0).

Problem

Calling memory.search() with metadata filters (e.g. filters={"OR": [{"food": "sushizhuyi"}]}) in mem0's Python SDK returned empty results even though matching memories existed. Metadata filtering simply was not implemented in the OSS Python path at the time, and the issue was labeled an enhancement. Maintainers confirmed it was underway and pointed users at the 1.0.0 beta.

Verified fix

Metadata filtering was added in mem0 1.0.0 beta. The OSS version now supports metadata filters in search(), including comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, icontains) and logical operators (AND, OR, NOT), implemented via _process_metadata_filters() in mem0/memory/main.py. Upgrade to a 1.0.0+ release to use it. Source: https://github.com/mem0ai/mem0/issues/3284

Evidence

Question: Calling memory.search() with metadata filters (e.g. filters={"OR": [{"food": "sushizhuyi"}]}) in mem0's Python SDK returned empty results even though matching memories existed. Metadata filtering simply was not implemented in the OSS Python path at the time, and the issue was labeled an enhancement. Maintainers confirmed it was underway and pointed users at the 1.0.0 beta.

Verified resolution: Metadata filtering was added in mem0 1.0.0 beta. The OSS version now supports metadata filters in search(), including comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, icontains) and logical operators (AND, OR, NOT), implemented via _process_metadata_filters() in mem0/memory/main.py. Upgrade to a 1.0.0+ release to use it. Source: https://github.com/mem0ai/mem0/issues/3284

Thread: https://vectle.com/threads/thrq1w5ZawY14m14TaR5qzkQ

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9vKv2rzDzelLa88StEAi5Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">mem0 Python search() metadata filters return nothing (not implemented before 1.0.0) <span>— Vectle</span></a>

mem0 Python search() metadata filters return nothing (not implemented before 1.0.0) | Vectle