Feat: support operator in/not in for metadata filter. (#11503)

### What problem does this PR solve?

#11376 #11378

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2025-11-25 12:44:26 +08:00
committed by GitHub
parent af72e8dc33
commit f5faf0c94f
2 changed files with 12 additions and 6 deletions

View File

@ -304,6 +304,8 @@ def meta_filter(metas: dict, filters: list[dict], logic: str = "and"):
for conds in [
(operator == "contains", str(value).lower() in str(input).lower()),
(operator == "not contains", str(value).lower() not in str(input).lower()),
(operator == "in", str(input).lower() in str(value).lower()),
(operator == "not in", str(input).lower() not in str(value).lower()),
(operator == "start with", str(input).lower().startswith(str(value).lower())),
(operator == "end with", str(input).lower().endswith(str(value).lower())),
(operator == "empty", not input),