Update mapping of index

Hi All,

I am trying to update mapping of an existing index "tweetindex" which has
no data.

Initial mapping of "tweetindex "index is:

{
"tweet" : {
"_source" : { "enabled" : false},
"properties" : {
"field1" : { "type" : "string", "index" :
"not_analyzed","store":"yes" },
"field2" : { "type" : "string", "index" :
"analyzed","store":"yes" }
}
}
}

New mapping which i want is:

{
"tweet" : {
"_source" : { "enabled" : false},
"properties" : {
"field1" : { "type" : "string", "index" :
"no","store":"yes" },
"field2" : { "type" : "string", "index" :
"analyzed","store":"yes" }
}
}
}

I want to update mapping of field1 from not_analyzed to no But its
throwing an exception:

{"error":"MergeMappingException[Merge failed with failures {[mapper
[field1] has different index values, mapper [field1] has different
tokenize values, mapper [field1] has different
index_analyzer]}]","status":400}

Any suggestion regarding this will be really helpful !!

--
Thanks & Regards
Hanish Bansal

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You have to reindex with a new type (or new index).

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 août 2013 à 09:26, Hanish Bansal hanish.bansal.agarwal@gmail.com a écrit :

Hi All,

I am trying to update mapping of an existing index "tweetindex" which has no data.

Initial mapping of "tweetindex "index is:

{
"tweet" : {
"_source" : { "enabled" : false},
"properties" : {
"field1" : { "type" : "string", "index" : "not_analyzed","store":"yes" },
"field2" : { "type" : "string", "index" : "analyzed","store":"yes" }
}
}
}

New mapping which i want is:

{
"tweet" : {
"_source" : { "enabled" : false},
"properties" : {
"field1" : { "type" : "string", "index" : "no","store":"yes" },
"field2" : { "type" : "string", "index" : "analyzed","store":"yes" }
}
}
}

I want to update mapping of field1 from not_analyzed to no But its throwing an exception:

{"error":"MergeMappingException[Merge failed with failures {[mapper [field1] has different index values, mapper [field1] has different tokenize values, mapper [field1] has different index_analyzer]}]","status":400}

Any suggestion regarding this will be really helpful !!

--
Thanks & Regards
Hanish Bansal

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.