mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-20 03:09:10 +08:00
Fix chunk position issue. (#3867)
### What problem does this PR solve? Close #3864 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
78601ee1bd
commit
5ae33184d5
@ -60,11 +60,6 @@ def list_chunk():
|
||||
sres = settings.retrievaler.search(query, search.index_name(tenant_id), kb_ids, highlight=True)
|
||||
res = {"total": sres.total, "chunks": [], "doc": doc.to_dict()}
|
||||
for id in sres.ids:
|
||||
chunk_elem = sres.field[id]
|
||||
if 'position_list' in chunk_elem:
|
||||
if isinstance(chunk_elem["position_list"], str):
|
||||
chunk_elem.pop('position_list') # Infinity will store position list as empty str
|
||||
|
||||
d = {
|
||||
"chunk_id": id,
|
||||
"content_with_weight": rmSpace(sres.highlight[id]) if question and id in sres.highlight else sres.field[
|
||||
|
Loading…
x
Reference in New Issue
Block a user