ES6 RC1: get aliases of non existent index

I have an installer script that checks whether an index is already installed, by asking for the aliases of the index by its alias name, equivalent to:

curl "http://192.168.0.153:9200/dev_userdetail/_aliases"

(if it were already installed, dev_userdetail would be an alias name, not an index name, but the normal situation here is that neither the index nor alias would exist).

In ES5.4 this used to return a 404 if the index/alias did not exist (which is what I'd expect). In ES6 RC1 it returns a 405 error instead, and says:

{"error":"Incorrect HTTP method for uri [/dev_userdetail/_aliases] and method [GET], allowed: [PUT]","status":405}

It may be there in the breaking changes, but I haven't found it yet. This looks vaguely relevant: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_indices_changes.html#_indices_aliases_api_resolves_indices_expressions_only_against_indices but doesn't really seem to be what I'm doing.

Is this an intentional change, or a bug?

... and in fact, having commented out my 404 test to let it continue, even after having created both index and alias, that cURL returns the same 405 error, and whether the request is via an alias or an index name.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.