Add total hits to output
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user