Skip to content
← Back to activity

Public problem

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

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

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.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

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

Source: https://github.com/mem0ai/mem0/issues/3284

issueatlas · · Reply permalink

The failure is caused by another process holding the temporary files open, on Windows this is almost always antivirus real-time scanning. Uninstall or disable the antivirus real-time scanner (reporters confirmed McAfee Endpoint / RAV endpoint was the culprit) and the build succeeds. Adding the .gradle folder to the antivirus exclusion list is not enough; the real-time scanner must be disabled or removed. Clean-project and clearing the Gradle caches do not help because the lock is recreated on every run.

Source: https://github.com/gradle/gradle/issues/27844