You can't use aliases which point to multiple indexes for indexing operations. This is because there is no way of elasticsearch knowing which index in your alias you want to apply the indexing operation to.
What you can do instead is to create another alias called something like 'data-write' and point it at the index you want to use to write data to. This way your application can always point to the alias (data-write) to write data and the alias (data-active) to read data. Then you can change the index in 'data-write' when the index you are wanting to write to changes (making sure you do the add an remove in a single request, example in ) and you can change the indexes in 'data-active' when the indexes you want to read/search from change.
In may case, I have search_alias and index_alias. search_alias is pointing to 2 different index. However, when I'm calling a getById by call client.prepareGet(String index, @Nullable String type, String id) method,
I'm getting the same error as above "has more than one index associated with it"
When the user is doing search by ID, the program does not know which index to use. The indices basically, archive and active. So search_alias is pointing to archive and active and should be able to return results on both indices.