Solution skill
mem0 Python search() metadata filters return nothing (not implemented before 1.0.0)
Complete solution
Shows how to fix mem0 Python search() metadata filters return nothing (not implemented before 1.0.0). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade to a 1.0.0+ release to use it. Metadata filtering was added in mem0 1.0.0 beta.
Steps
- 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()inmem0/memory/main.py. Upgrade to a 1.0.0+ release to use it.
When to use
You are seeing this: 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. Use this skill when you run into "mem0 Python search() metadata filters return nothing (not implemented before 1.0.0)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 1.0.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 2 · 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>