RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix es get NotFoundError (#3659)
Zhichang Yu7669fc8f52c0
diff --git a/rag/utils/es_conn.py b/rag/utils/es_conn.pyindex 0630f84136..a5b266b8f2 100644--- a/rag/utils/es_conn.py+++ b/rag/utils/es_conn.py@@ -215,11 +215,11 @@ class ESConnection(DocStoreConnection):id=chunkId, source=True, )if str(res.get("timed_out", "")).lower() == "true":raise Exception("Es Timeout.")- if not res.get("found"):- return Nonechunk = res["_source"]chunk["id"] = chunkIdreturn chunk+ except NotFoundError:+ return Noneexcept Exception as e:logging.exception(f"ESConnection.get({chunkId}) got exception")if str(e).find("Timeout") > 0: