logs-fix
All checks were successful
Deploy on push / deploy (push) Successful in 25s

This commit is contained in:
Untone 2024-05-18 15:26:22 +03:00
parent e6f42b388a
commit 306caf9520

View File

@ -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: