Alias created by dynamic template not working


{ES v2.3.2}

I've added alias to my dynamic template using aliases field, as explained here:

Then I've posted a trivial doc to the new index that matches template pattern.

New index is created, and its _settings show the alias, but it's ineffective somehow. Neither _cat/indices shows it nor can I search by alias name.

Am I missing something?


What does the template look like?

Hey! Thanks for your willingness to help.

I've found the problem(s) myself:

  1. I've put aliases inside settings - wrong. It should be settings' sibling.
  2. I'm using php/elastica, so the entire alias index (without filters or such) must be specified like this:
    'alias1' => new \stdClass() in order to properly serialize to JSON as stated in the docs ("alias1": {})

I know my question is bad, as it lacks clues to the solution, and problems came from my lack of focus, but I guess these might be useful to someone (esp. 2.) Regarding 1. it's also interesting that aliases field was saved to settings as such, and it was just ignored - no error.