Fix: Add missing filter methods to AsyncMemory#3624
Merged
parshvadaftari merged 1 commit intomem0ai:mainfrom Oct 22, 2025
Merged
Fix: Add missing filter methods to AsyncMemory#3624parshvadaftari merged 1 commit intomem0ai:mainfrom
parshvadaftari merged 1 commit intomem0ai:mainfrom
Conversation
Contributor
Author
|
The pipeline failures are from merged commit |
frederikb96
added a commit
to frederikb96/mem0
that referenced
this pull request
Oct 19, 2025
Enables date range and metadata filtering in MCP search endpoint.
Previously only supported basic query parameter.
- Add filters parameter with example annotation
- Pass filters to AsyncMemory.search()
- Maintains backward compatibility (filters optional)
Example usage: filters={'created_at': {'gte': '2025-01-15T10:00:00'}}
Depends on PR mem0ai#3624 (AsyncMemory filter methods fix)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
5 tasks
parshvadaftari
approved these changes
Oct 21, 2025
Contributor
parshvadaftari
left a comment
There was a problem hiding this comment.
Looks good to me.
Contributor
|
Hey @frederikb96 can you update your branch since the tests are failing and sync with the latest main? Thanks! |
14 tasks
AsyncMemory was calling _has_advanced_operators() and _process_metadata_filters() but these methods only existed in the sync Memory class, causing AttributeError when using filters. - Copy _has_advanced_operators() from Memory class - Copy _process_metadata_filters() from Memory class - No new code written, just copied forgotten methods This maintains the existing sync/async duplication pattern. Not beautiful, but necessary before any potential refactor of the duplicate code structure. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
4622338 to
105c3b7
Compare
Contributor
Author
|
Hey, yes no problem, I rebased it :) |
Contributor
|
Thank you for making mem0 better @frederikb96 |
garciaba79
pushed a commit
to garciaba79/mem0
that referenced
this pull request
Feb 12, 2026
Co-authored-by: Claude <noreply@anthropic.com>
jamebobob
pushed a commit
to jamebobob/mem0-vigil-recall
that referenced
this pull request
Mar 29, 2026
Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AsyncMemory.search()was calling_has_advanced_operators()and_process_metadata_filters()methods that only existed in the syncMemoryclass, causingAttributeErrorwhen using thefiltersparameter in async context.Solution
Copied both missing methods from
MemorytoAsyncMemory:_has_advanced_operators()- Detects advanced filter operators_process_metadata_filters()- Processes enhanced filter syntaxThese are pure utility methods (no I/O) that were forgotten during previous updates. No new code written, just copied the existing implementations to restore sync/async parity.
Why Not Refactor?
The codebase follows a sync/async duplication pattern throughout (both classes ~2000 lines each). While not ideal, this maintains consistency with the existing architecture. A proper refactor to extract shared utilities would be a separate effort.
Testing
Fixes blocker for using filters with async memory operations.