mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-10-13 23:47:13 +00:00
Fix index creation
This commit is contained in:
1 parent
a2998f3968
commit
7f85b1b346
1 file changed
+4
-3
@@ -209,9 +209,10 @@ def create_indexes(names, settings=None):
|
||||
if not index.exists():
|
||||
logger.debug("Creating Elasticsearch index: {0}".format(name))
|
||||
if settings is None:
|
||||
settings = dict(number_of_shards=1,
|
||||
number_of_replicas=1)
|
||||
index.put_settings(body=settings, preserve_existing=True)
|
||||
index.settings(number_of_shards=1,
|
||||
number_of_replicas=1)
|
||||
else:
|
||||
index.settings(**settings)
|
||||
index.create()
|
||||
except Exception as e:
|
||||
raise ElasticsearchError(
|
||||
|
||||
Reference in new issue
Block a user