Elasticsearch Index allocation: How do I do it?

Hi All,

I've the use case of storing logs in ES. For that, I want newer indices to reside on a different set of ES nodes than the older indices. Both nodes should however be in the same cluster. I see that we have a doc for that but it doesn't work it seems. https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html

I get this error while trying to move the index.

curl -XPOST localhost:9210/akamai_cloudmonitor_media-prod.20160405-21/_settings -d '{ "index.routing.allocation.include.box_type" : "storage" }'
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Field name [index.routing.allocation.include.box_type] cannot contain '.'"}],"type":"mapper_parsing_exception","reason":"Field name [index.routing.allocation.include.box_type] cannot contain '.'"},"status":400}%

What's the "current" way of doing this?


Use PUT instead of POST.

1 Like

THanks @dadoonet, that seems to be working. I feel stupid now.

This can be done through Curator using the principles outlined in this blog post.

Be happy that you did not run DELETE by mistake :stuck_out_tongue: