Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix chunk position issue. (#3867)

Kevin Hu5ae33184d5e3
diff --git a/api/apps/chunk_app.py b/api/apps/chunk_app.py
index 90d04b0445..b6a978e319 100644
--- a/api/apps/chunk_app.py
+++ b/api/apps/chunk_app.py
@@ -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[