From 875554ec1cc2e1a763b4dfa579ebf857181ff54c Mon Sep 17 00:00:00 2001 From: "Ponnuswamy, Saravana" Date: Thu, 12 Jan 2017 15:28:04 +0900 Subject: [PATCH] added fix to support es5 --- elastalert/create_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elastalert/create_index.py b/elastalert/create_index.py index 185ad3c83..4973b0fd3 100644 --- a/elastalert/create_index.py +++ b/elastalert/create_index.py @@ -120,7 +120,7 @@ def main(): print('Index ' + index + ' already exists. Skipping index creation.') return None - es.indices.create(index) + es.indices.index(index) # To avoid a race condition. TODO: replace this with a real check time.sleep(2) es.indices.put_mapping(index=index, doc_type='elastalert', body=es_mapping)