mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-12 23:15:25 +00:00
6.3.3
Set `number_of_shards` and `number_of_replicas` to `1` when creating indexes
This commit is contained in:
+6
-1
@@ -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
|
||||
-----
|
||||
|
||||
@@ -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:'
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user