mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: numeric string miss transformation. (#11025)
### What problem does this PR solve? #11024 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -294,12 +294,13 @@ def meta_filter(metas: dict, filters: list[dict]):
|
|||||||
def filter_out(v2docs, operator, value):
|
def filter_out(v2docs, operator, value):
|
||||||
ids = []
|
ids = []
|
||||||
for input, docids in v2docs.items():
|
for input, docids in v2docs.items():
|
||||||
try:
|
if operator in ["=", "≠", ">", "<", "≥", "≤"]:
|
||||||
input = float(input)
|
try:
|
||||||
value = float(value)
|
input = float(input)
|
||||||
except Exception:
|
value = float(value)
|
||||||
input = str(input)
|
except Exception:
|
||||||
value = str(value)
|
input = str(input)
|
||||||
|
value = str(value)
|
||||||
|
|
||||||
for conds in [
|
for conds in [
|
||||||
(operator == "contains", str(value).lower() in str(input).lower()),
|
(operator == "contains", str(value).lower() in str(input).lower()),
|
||||||
|
|||||||
Reference in New Issue
Block a user