fix: match list-valued metadata filters by item - #399
Merged
ASuresh0524 merged 2 commits intoAug 21, 2026
Merged
Conversation
Collaborator
|
@Iams4kura Can we fix CI? |
…tadata-membership-20260821t040221z
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.
What does this PR do?
Metadata filtering documents
inas matching any requested tag, but list-valued fields were compared as one scalar value. As a result, a result taggedadventurefailedin: ["adventure"]and incorrectly passednot_in: ["adventure"].This change:
not_inthe exact complement while preserving its existing validation error;tagsfixture.Regression evidence
tests/test_metadata_filtering.pyfailed both new assertions (2 failed, 33 passed).35 passed).Related Issues
No existing issue. Exact issue and PR searches for metadata filters,
not_in, and list-valued tags found only the original merged feature work and unrelated reports.Checklist
pytest tests/test_metadata_filtering.py -v --tb=short; 35 passed)ruff formatandruff checkvia pre-commit)pre-commit run --all-files)ty check packages/leann-core/src apps tests; 3 pre-existing warnings)leann-coresource distribution and wheel build successfullyThe full multi-backend test matrix was not reproduced locally because the repository's CI workflow first builds and installs native backend artifacts and recursive submodules. The complete official metadata-filtering suite, repository-wide pre-commit hooks, repository-wide type check, and affected package build cover this isolated pure-Python change; CI can exercise the platform/backend matrix.