|
|
|
|
|
|
|
|
id=chunkId, source=True, ) |
|
|
id=chunkId, source=True, ) |
|
|
if str(res.get("timed_out", "")).lower() == "true": |
|
|
if str(res.get("timed_out", "")).lower() == "true": |
|
|
raise Exception("Es Timeout.") |
|
|
raise Exception("Es Timeout.") |
|
|
if not res.get("found"): |
|
|
|
|
|
return None |
|
|
|
|
|
chunk = res["_source"] |
|
|
chunk = res["_source"] |
|
|
chunk["id"] = chunkId |
|
|
chunk["id"] = chunkId |
|
|
return chunk |
|
|
return chunk |
|
|
|
|
|
except NotFoundError: |
|
|
|
|
|
return None |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
logging.exception(f"ESConnection.get({chunkId}) got exception") |
|
|
logging.exception(f"ESConnection.get({chunkId}) got exception") |
|
|
if str(e).find("Timeout") > 0: |
|
|
if str(e).find("Timeout") > 0: |