### What problem does this PR solve? Fix a small non-blocking main workflow bug about chunk update When OpenSearch is the doc engine. When you wanna enable/disable a chunk in the web-page “Knowledge Base / Dataset / Chunk”, the bug ocurred. <img width="2388" height="662" alt="image" src="https://github.com/user-attachments/assets/575987a0-c929-4589-bfa0-ba54e137cfd9" /> The reaseon why it ocurred is that some api params between OpenSearch and ES differs. It functioned well no matter enable/disable/rewrite the chunk after I fixed. I also checked the result when using the chat web-page. <img width="2394" height="660" alt="image" src="https://github.com/user-attachments/assets/8b899dc6-d769-4e80-8dd8-ad0fbbca5f78" /> I will still focus on vector-database espeically OpenSearch. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: 张雨豪 <zhangyh80@chinatelecom.cn> Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>tags/v0.20.0
| @@ -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( | |||