es = Elasticsearch([{'host': config.elastic_host, 'port': config.elastic_port}]
    )
if es.indices.exists(config.elastic_urls_index):
    es.indices.delete(index=config.elastic_urls_index)
settings = {'settings': {'number_of_shards': 1, 'number_of_replicas': 0},
    'mappings': {'urls': {'properties': {'url': {'type': 'string'}}}}}
es.indices.create(index=config.elastic_urls_index, ignore=400, body=settings)
Сопоставления набора клиентов python elasticsearch во время создания индекса