elasticsearch-head icon indicating copy to clipboard operation
elasticsearch-head copied to clipboard

Optimize index broken for ES 5

Open andrese opened this issue 8 years ago • 1 comments

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

andrese avatar Apr 18 '17 09:04 andrese

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...

andrese avatar Sep 14 '17 17:09 andrese