Elastic is_write_index vs index_routing in alias

It seems like alias has the same feature with two different names,

What is the different between this two actually?

When to use one over the other?

is_write_index directs writes to a specific index.
index_routing directs reads to specific indices.

so what is the different between search_routing and index_routing then?

so what is the different between search_routing and index_routing then?

The is_write_index specifies which index a document is written to when written to the alias. Once written to the index it may go into any shard. I believe ILM uses this to direct all new data written to the latest index while allowing all indices to be searched.

The search_routing and index_routing settings are related in that they set a specific routing value when data is written or retrieved through the index. This makes all related data accessed through the alias go to the same shard within the index. This can be sued ina multi-tenant environment where each user accesses data through an alias and all data can be concentrated into a single shard per index. This means fewer shards need to be queried when the alias is used which can help with performance.

1 Like

I see..
so routing is all about shards.
that's where I got confused.

Thanks Christian.