Add total hits to output

This commit is contained in:
2023-02-01 07:20:24 +00:00
parent 53cb9a7f76
commit 66596cda42
4 changed files with 18 additions and 6 deletions

View File

@@ -300,8 +300,8 @@ class ElasticsearchBackend(StorageBackend):
search_query,
index=index,
)
self.log.debug(f"Running scheduled query on {index}: {search_query}")
self.log.debug(f"Response from scheduled query: {response}")
# self.log.debug(f"Running scheduled query on {index}: {search_query}")
# self.log.debug(f"Response from scheduled query: {response}")
if isinstance(response, Exception):
error = response.info["error"]["root_cause"][0]["reason"]
self.log.error(f"Error running scheduled search: {error}")
@@ -310,7 +310,7 @@ class ElasticsearchBackend(StorageBackend):
# No results, skip
continue
meta, response = self.parse(response, meta=True)
print("Parsed response", response)
# print("Parsed response", response)
if "message" in response:
self.log.error(f"Error running scheduled search: {response['message']}")
continue