Skip to content

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

Bug fix: OpenSearch chunk update some api error (#9032)

pyyuhao49f3f266227c
diff --git a/rag/utils/opensearch_conn.py b/rag/utils/opensearch_conn.py
index 4fd09b782e..b53a6123fa 100644
--- a/rag/utils/opensearch_conn.py
+++ b/rag/utils/opensearch_conn.py
@@ -329,7 +329,7 @@ class OSConnection(DocStoreConnection):
chunkId = condition["id"]
for i in range(ATTEMPT_TIME):
try:
- self.os.update(index=indexName, id=chunkId, body=doc)
+ self.os.update(index=indexName, id=chunkId, body={"doc":doc})
return True
except Exception as e:
logger.exception(