ttt
ttt

Reputation: 6809

Elasticsearch rename index

I have an index named "products" and another one named "products_temp". I want to fill the "products_temp" with new products then delete the "products" index and rename the "products_temp" index to "products". Is this possible in Elasticsearch? If it is, what's the recommended approach?

I have to repeat this "products resync" process every day once.

Upvotes: 6

Views: 9725

Answers (2)

Khai Pham
Khai Pham

Reputation: 9

it is fully convertible, in your beat.yml configuration on Elastic output you add:

setup.ilm.enabled: false
output.elasticsearch.index: "customname -% {[agent.version]} -% {+ yyyy.MM.dd}"
setup.template.name: "customname"
setup.template.pattern: "customname- *"

Screenshot

Upvotes: 1

Praneeth
Praneeth

Reputation: 751

Renaming indices is not possible. Recommended way is to use aliasand point that to whatever index you want.

Refer: How to rename indices

Upvotes: 4

Related Questions