# Rename index using script processor

**URL:** https://discuss.elastic.co/t/rename-index-using-script-processor/163899
**Category:** Elasticsearch
**Created:** [January 11, 2019, 12:23pm UTC](https://discuss.elastic.co/t/rename-index-using-script-processor/163899 "2019-01-11T12:23:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alberto.latorre](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@alberto.latorre](https://discuss.elastic.co/u/alberto.latorre)
#### Post date: [January 11, 2019, 12:23pm UTC](https://discuss.elastic.co/t/rename-index-using-script-processor/163899/1 "2019-01-11T12:23:18Z")

</div>

Hello all.

I see in

[https://www.elastic.co/guide/en/elasticsearch/reference/6.5/script-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/script-processor.html)

that "Using the above pipeline, we can attempt to index a document into the any\_index index"

I have made a test and it works. But it is done document by document.

My question is:  
In order to rename an index, is it worth working on a pipeline or procedure based on the above or the preferred method is still reindexing?

Thank you very much.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 8, 2019, 12:23pm UTC](https://discuss.elastic.co/t/rename-index-using-script-processor/163899/2 "2019-02-08T12:23:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
