Skip to content

fix(qdrant): add support for $and/$or composite filters#3861

Closed
majiayu000 wants to merge 1 commit intomem0ai:mainfrom
majiayu000:fix/3791-qdrant-composite-filters
Closed

fix(qdrant): add support for $and/$or composite filters#3861
majiayu000 wants to merge 1 commit intomem0ai:mainfrom
majiayu000:fix/3791-qdrant-composite-filters

Conversation

@majiayu000
Copy link
Copy Markdown

Summary

  • Refactored _create_filter to handle $and and $or operators
  • $and conditions are added to Qdrant's must array
  • $or conditions are added to Qdrant's should array
  • Supports mixing simple filters with composite operators

Test plan

  • Added tests for $and operator
  • Added tests for $or operator
  • Added tests for mixed operators
  • All existing Qdrant tests pass

Fixes #3791

- Refactored _create_filter to handle $and and $or operators
- $and conditions are added to must array
- $or conditions are added to should array
- Supports mixing simple filters with composite operators
- Added comprehensive tests for composite filter scenarios

Fixes mem0ai#3791

Signed-off-by: majiayu000 <1835304752@qq.com>
@utkarsh240799
Copy link
Copy Markdown
Contributor

Hi @majiayu000 ,

Thank you for taking the time to come up with the PR. The parent issue has been closed as it was the duplicate of issue #3975 which was resolved with PR #4127. Closing this PR as the parent issue has been fixed.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Qdrant._create_filter() does not support AND/OR composite filters, causing MatchValue validation error

2 participants