Fix: Infinity keyword round-trip, highlight fallback, and KB update guards (#12660)

### What problem does this PR solve?

Fixes Infinity-specific API regressions: preserves ```important_kwd```
round‑trip for ```[""]```, restores required highlight key in retrieval
responses, and enforces Infinity guards for unsupported
```parser_id=tag``` and pagerank in ```/v1/kb/update```. Also removes a
slow/buggy pandas row-wise apply that was throwing ```ValueError``` and
causing flakiness.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
6ba3i
2026-01-16 20:03:52 +08:00
committed by GitHub
parent 59075a0b58
commit 4f036a881d
4 changed files with 45 additions and 4 deletions

View File

@ -367,7 +367,10 @@ class InfinityConnectionBase(DocStoreConnection):
num_rows = len(res)
column_id = res["id"]
if field_name not in res:
return {}
if field_name == "content_with_weight" and "content" in res:
field_name = "content"
else:
return {}
for i in range(num_rows):
id = column_id[i]
txt = res[field_name][i]