oliver006/elasticsearch-test-data

Delete index not working

Open

#13 opened on Jul 28, 2018

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Python (121 forks)github user discovery
help wanted

Repository metrics

Stars
 (259 stars)
PR merge metrics
 (PR metrics pending)

Description

How to reproduce:

  • Specify the --force_delete_index=True option
  • Expected result: the index is deleted
  • Actual result: a 400 Bad Request error is returned by Elasticsearch, the index is not deleted

Fix:

  • Remove ?refresh=true from the url variable in function delete_index
-        url = "%s/%s?refresh=true" % (tornado.options.options.es_url, idx_name)
+        url = "%s/%s" % (tornado.options.options.es_url, idx_name)

Contributor guide