elasticsearch-head
elasticsearch-head copied to clipboard
Optimize index broken for ES 5
Hi,
Optimizing an index from the overview tab seems broken as the elasticsearch "optimize" rest endpoint changed at versión 5 (see breaking changes https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_rest_api_changes.html).
According to the docs, starting with ES5 optimize request should be send to "/_forcemerge" endpoint instead of "/_optimize".
A solution could be to make the name of the endpoint used my head to be versión dependent?.
I'm not that familiar with heads language stack, but... i guess the funcion that could be modified is "_optimizeIndex_handler: function(index) " where it somehow could calculate the endpoint taking into account ES cluster version... (take this suggestion with a pintch of salt)
Best regards, and thanks for such an usefull software
Hi All,
Just fixed this issue modifying optimize/forcemerge to call a different url depending on ES version(<5.0.0)
Sending a pull request...