Commit 4e9782a2 authored by mkollo's avatar mkollo
Browse files

Patched error with closing indices.

parent 01d7e8d3
......@@ -685,8 +685,12 @@ class ES_Manager:
@staticmethod
def single_index_count(index_name: str) -> int:
count = Search(using=Elasticsearch(es_url), index=index_name).count()
return count
try:
count = Search(using=Elasticsearch(es_url), index=index_name).count()
return count
except elasticsearch.RequestError as e:
return None
def get_field_mappings(self) -> dict:
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment