Fix "Result window is too large" during meta data search (#13521)

### What problem does this PR solve?

Fix
https://github.com/infiniflow/ragflow/issues/13210#issuecomment-3982878498

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
qinling0210
2026-03-12 18:59:56 +08:00
committed by GitHub
parent cebf5892ec
commit 1be07a0a34
3 changed files with 22 additions and 40 deletions

View File

@ -264,7 +264,8 @@ class ESConnection(ESConnectionBase):
assert "id" in d
d_copy = copy.deepcopy(d)
d_copy["kb_id"] = knowledgebase_id
meta_id = d_copy.pop("id", "")
# Use id as _id for uniqueness, also keep "id" as a regular field for sorting
meta_id = d_copy.get("id", "")
operations.append(
{"index": {"_index": index_name, "_id": meta_id}})
operations.append(d_copy)