# How to use mutate in elasticsearch Input plugin?

**URL:** https://discuss.elastic.co/t/how-to-use-mutate-in-elasticsearch-input-plugin/51046
**Category:** Logstash
**Created:** [May 26, 2016, 10:46am UTC](https://discuss.elastic.co/t/how-to-use-mutate-in-elasticsearch-input-plugin/51046 "2016-05-26T10:46:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [May 26, 2016, 10:46am UTC](https://discuss.elastic.co/t/how-to-use-mutate-in-elasticsearch-input-plugin/51046/1 "2016-05-26T10:46:12Z")

</div>

Hi Experts ,

Requirement :- Remove fields from an existing Index.  
I am using LS to reindex my data . I am using

```
input {
  elasticsearch {
hosts => ["localhost"]
port => "9200" 
index => "cef-2016-04-01"
scroll => "20m"
  }
}
output {
  elasticsearch {
host => "localhost"
protocol => "http"
index => "cefoneshard"
  }
  stdout {
    codec => "dots"
  }
}

```

Above is working absolutely fine but I want to delete Message field from OLD index . By this I mean new index should not have message field in it . I was curious to know if this is possible with above LS config file .Something like Mutate. If not please help me to achieve this .

Thanks  
VG

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 26, 2016, 9:46pm UTC](https://discuss.elastic.co/t/how-to-use-mutate-in-elasticsearch-input-plugin/51046/2 "2016-05-26T21:46:36Z")

</div>

Mutate should definitely be able to do it.

---

<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: [July 6, 2017, 4:55am UTC](https://discuss.elastic.co/t/how-to-use-mutate-in-elasticsearch-input-plugin/51046/3 "2017-07-06T04:55:59Z")

</div>


