diff --git a/CHANGELOG.md b/CHANGELOG.md index 30c5578..00dc129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ----- diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index e729bb9..895e1a8 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -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:' diff --git a/parsedmarc/elastic.py b/parsedmarc/elastic.py index c7cd7eb..771f8d8 100644 --- a/parsedmarc/elastic.py +++ b/parsedmarc/elastic.py @@ -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( diff --git a/setup.py b/setup.py index 370b869..c79db71 100644 --- a/setup.py +++ b/setup.py @@ -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"