Ok, so, I ran into a situation where I really needed to be able to rename my index. Somehow it was created before my template was applied and as a result it was a normal index instead of an alias. Which turned into a giant 300+GB index.
From previous experience I knew that Elasticsearch does not support actual renaming, so I figured out a partial work around. Only partial because I will (or have already) end up losing data due to lack of space. Cloning failed, and I can only reindex some of the data before I (will run) ran out of room.
This whole situation would be far simpler to resolve if I could just rename the index as the target of the alias, make sure the alias/rollover/template is working, and then be done. I'd let ILM go in and roll over the index and deal with all the data stuff it needs to deal with.
I did some searching to see if anyone had addressed my question already, but so far all I've found are posts about "use clone/reindex/aliases" instead. Not anything about WHY.
This is actually the kind of answer I was looking for. Thanks!
I was going to ask why it's immutable, but after thinking about it, it makes sense that the relationship is immutable just like an sql table row is immutable to the table it is in.
I think the reason I thought it wasn't like that is because the data storage of the indices doesn't use the index name, just all the random folder names. So I was thinking of the index name as basically an alias to some randomized real name.
Er, clone doesn't work when you don't have enough disk space for it. Reindex only sorta worked because i didn't end up saving all the data. I let a lot of it just get deleted.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.