# "rename" filter didn't rename the field in events

**URL:** https://discuss.elastic.co/t/rename-filter-didnt-rename-the-field-in-events/35711
**Category:** Logstash
**Created:** [November 27, 2015, 7:15am UTC](https://discuss.elastic.co/t/rename-filter-didnt-rename-the-field-in-events/35711 "2015-11-27T07:15:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![KavyaS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KavyaS](https://discuss.elastic.co/u/KavyaS)
#### Post date: [November 27, 2015, 7:15am UTC](https://discuss.elastic.co/t/rename-filter-didnt-rename-the-field-in-events/35711/1 "2015-11-27T07:15:25Z")

</div>

I used the filter plugin "rename" to rename a field in my events. Logstash didn't show any error on restart. But there doesn't seem to be any changes to the field name(checked in sense plugin). I added "rename" after indexing the file. How can I rename a field after indexing? I'm using LS-2.0, ES-2.0. This is a piece of my logstash.conf file:

```
filter {
	grok {
			match => {"message" => "^(?<EventTime>[0-9 \-\:]*)\s(?<MovieName>[\w.\-\']*)\s(?<Rating>[\d.]+)\s(?<NoOfDownloads>\d+)\s(?<NoOfViews>\d+)" }
		}
		
	mutate {
		convert => {"Rating" => "float"}
		}
	mutate {
		convert => {"NoOfDownloads" => "integer"}
		}
	mutate {
		convert => {"NoOfViews" => "integer"}
		}
		
	mutate{
		rename => { "NoOfViews" => "TotalViews" }
		}
> }
```

---

<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: [November 27, 2015, 7:27am UTC](https://discuss.elastic.co/t/rename-filter-didnt-rename-the-field-in-events/35711/2 "2015-11-27T07:27:37Z")

</div>

You need to reindex the data.

---

<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, 5:21am UTC](https://discuss.elastic.co/t/rename-filter-didnt-rename-the-field-in-events/35711/3 "2017-07-06T05:21:03Z")

</div>


