can't update mappings

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

can't update mappings

John Chang
Hello, I am having trouble updating mappings.  I have read:
http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/put_mapping/
and the "Doubt on updating mappings" article in the forum.

I want to change a field from being not stored to stored.  I tried to re-run the the json mapping (with the update) through curl , and I keep getting:
{"error":"Merge failed with failures [[Mapper [receivedDate] exists, can't merge]]"}

To update a mapping, do I just re-run the same mappings json I used to create the mappings (with the changes)?  (That is what I'm trying and it is not working.)  If not, what do I do?

Also, it is not clear to me where I put the ignore_conflicts param.  Is that what I need?  I wasn't sure on what level of the json tp put it in.  If that is what I need, could you please give a little more information about where to drop it into the json or the url?

Thanks,
John
Reply | Threaded
Open this post in threaded view
|

Re: can't update mappings

kimchy
Administrator
You can't change a field form not being stored to being stored. ignore conflicts will simply ignore this conflict, but not apply it. You will need to reindex your index.

-shay.banon

On Mon, Jul 26, 2010 at 10:06 PM, John Chang <[hidden email]> wrote:

Hello, I am having trouble updating mappings.  I have read:
http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/put_mapping/
and the "Doubt on updating mappings" article in the forum.

I want to change a field from being not stored to stored.  I tried to re-run
the the json mapping (with the update) through curl , and I keep getting:
{"error":"Merge failed with failures [[Mapper [receivedDate] exists, can't
merge]]"}

To update a mapping, do I just re-run the same mappings json I used to
create the mappings (with the changes)?  (That is what I'm trying and it is
not working.)  If not, what do I do?

Also, it is not clear to me where I put the ignore_conflicts param.  Is that
what I need?  I wasn't sure on what level of the json tp put it in.  If that
is what I need, could you please give a little more information about where
to drop it into the json or the url?

Thanks,
John
--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/can-t-update-mappings-tp997221p997221.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.