Fix: rank feat issue. (#6225)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-03-18 16:07:29 +08:00 committed by GitHub
parent 5cf610af40
commit 6e8d0e3177
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -259,6 +259,7 @@ class Dealer:
for i in search_res.ids:
nor, denor = 0, 0
if not search_res.field[i].get(TAG_FLD):
rank_fea.append(0)
continue
for t, sc in eval(search_res.field[i].get(TAG_FLD, "{}")).items():
if t in query_rfea:

View File

@ -100,7 +100,7 @@ def clean_markdown_block(text):
return text.strip()
def get_float(v: str | None):
def get_float(v: str | int | float | None):
if v is None:
return float('-inf')
try: