This commit is contained in:
parent
e6f42b388a
commit
306caf9520
|
@ -138,17 +138,14 @@ class SearchService:
|
||||||
result = json.loads(result)
|
result = json.loads(result)
|
||||||
if isinstance(result, dict):
|
if isinstance(result, dict):
|
||||||
mapping = result.get(self.index_name, {}).get("mappings")
|
mapping = result.get(self.index_name, {}).get("mappings")
|
||||||
|
logger.debug(f"Найдена структура индексации: {mapping['properties'].keys()}")
|
||||||
if (
|
if (
|
||||||
mapping
|
mapping
|
||||||
and mapping["properties"].keys()
|
and mapping["properties"].keys()
|
||||||
!= expected_mapping["properties"].keys()
|
!= expected_mapping["properties"].keys()
|
||||||
):
|
):
|
||||||
logger.debug(f"Найдена структура индексации: {mapping['properties'].keys()}")
|
|
||||||
logger.debug(f"Ожидаемая структура индексации: {expected_mapping}")
|
logger.debug(f"Ожидаемая структура индексации: {expected_mapping}")
|
||||||
|
logger.warn("[!!!] Требуется переиндексация всех данных")
|
||||||
logger.warn(
|
|
||||||
"[!!!] Требуется другая структура индексации и переиндексация всех данных"
|
|
||||||
)
|
|
||||||
self.delete_index()
|
self.delete_index()
|
||||||
self.client = None
|
self.client = None
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user