Преглед изворни кода

Fix es get NotFoundError (#3659)

### What problem does this PR solve?

Fix es get NotFoundError

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.14.1
Zhichang Yu пре 11 месеци
родитељ
комит
7669fc8f52
No account linked to committer's email address
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2
    2
      rag/utils/es_conn.py

+ 2
- 2
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 None
chunk = res["_source"]
chunk["id"] = chunkId
return chunk
except NotFoundError:
return None
except Exception as e:
logging.exception(f"ESConnection.get({chunkId}) got exception")
if str(e).find("Timeout") > 0:

Loading…
Откажи
Сачувај