diff --git a/cron/rotateIndexes.py b/cron/rotateIndexes.py index 4795906c..850088d3 100755 --- a/cron/rotateIndexes.py +++ b/cron/rotateIndexes.py @@ -79,11 +79,11 @@ def esRotateIndexes(): "number_of_shards": 1 } } - es.create_index(newindex, index_config) - logger.debug('Creating %s index' % newindex) - else: - es.create_index(newindex) logger.debug('Creating %s index' % newindex) + es.create_index(newindex, index_config) + else: + logger.debug('Creating %s index' % newindex) + es.create_index(newindex) # set aliases: events to events-YYYYMMDD # and events-previous to events-YYYYMMDD-1 logger.debug('Setting {0} alias to index: {1}'.format(index, newindex))