Set `number_of_shards` and `number_of_replicas` to `1` when creating indexes
This commit is contained in:
Sean Whalen
2019-04-22 19:48:53 -04:00
parent 536b94ff90
commit 775f80c02c
4 changed files with 12 additions and 5 deletions
+6 -1
View File
@@ -1,7 +1,12 @@
6.3.3
-----
- Set `number_of_shards` and `number_of_replicas` to `1` when creating indexes
6.3.2
-----
- Fix the `monthly_indexes` option in the `elastocsearch` configuration section
- Fix the `monthly_indexes` option in the `elasticsearch` configuration section
6.3.1
-----
+1 -1
View File
@@ -38,7 +38,7 @@ from parsedmarc.utils import is_outlook_msg, convert_outlook_msg
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
from parsedmarc.utils import parse_email
__version__ = "6.3.2"
__version__ = "6.3.3"
logging.basicConfig(
format='%(levelname)8s:%(filename)s:%(lineno)d:'
+4 -2
View File
@@ -208,8 +208,10 @@ def create_indexes(names, settings=None):
try:
if not index.exists():
logger.debug("Creating Elasticsearch index: {0}".format(name))
if settings:
index.put_settings(settings)
if settings is None:
settings = dict(number_of_shards=1,
number_of_replicas=1)
index.put_settings(settings)
index.create()
except Exception as e:
raise ElasticsearchError(
+1 -1
View File
@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
__version__ = "6.3.2"
__version__ = "6.3.3"
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"