Removing field from mapping

We are using ES 1.5 and plan to upgrade to ES 2.x. We store server log files. In a particular type there is a dynamically-created field (field name extracted from the source logs) with dots in it. Since ES 2.0 cannot have fields with dots in them we deleted those offending documents (don't worry, not a loss). However the mapping for that type in the index keeps the mapping for the fields with dots, even though no documents now have that field. We've also updated Logstash to not index dotted fields.

How can I update the type mapping to remove that field so that the index will be compatible with ES 2.0?
If the answer is to reindex the index, how do I do this and will the mappings for the now-unused field be copied too?


You need to reindex, you can use Logstash for this as well - Reindexing Elasticsearch with Logstash 2.0 · GitHub

If you have deleted all these docs then you shouldn't need to worry about the mappings being carried over.

Hi all,
I have a similar situation: I have to upgrade my cluster from 1.4.4 to 2.4.3 and some of my indexes has field name with dots inside.
Could someone suggest me the best way to solve this issue?

I cannot use logstash as suggested by warkolm, because I am not using it for my application.


Hi all,
I have tried the workaround with parameter -Dmapper.allow_dots_in_name=true without success.

Perhaps there is a conflict problem, because I have an object as follow:
document {
messaggi {

and a field as follow

Could someone help me with this trouble?