I'm trying to better understand aliases and how they may work across multiple indices.
I'm trying to practice one mapping per index in preparation for future Elasticsearch without types. As a result, I presently have 5 different indexes, each with its own mapping.
I would like to create a filtered and routed alias for each user of my Elasticsearch environment such that when a new user signs up for my app, they get their own alias (routed by their user id, and also filtered by their user id across all five indexes).
From what I understand according to the documentation:
ES 5.6 indicies-aliases
I can add an alias that contains an array of indices, a routing id, and a filter so that I can use that alias of the user to query only on their content. However, what I do not understand is how to make sure that their items are added appropriately to each index. As it says in the reference, "It is an error to index to an alias which points to more than one index."
So how do I go about adding the user's content into each index making sure that it gets routed appropriately?
Do I add their content to each index using their user id as a routing id for example?