A common good practice is using aliases.
With aliases you can easily create a new index do whatever you want and then 
switch your alias from old index to new one.

You can not "mutate" an object to a String.

Can't you modify the source document?
How looks like a "good" document vs a "bad" one?

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 19 mars 2014 à 08:47:09, Graham Jones ([email protected]) a écrit:

I have an ES index with 370 million records in it. 

I added 5 new records with fields what were all going to be objects. 
It then turned out that these new objects might have values in their keys that 
are unacceptable to ES and our other databases. 
I therefore changed the data that is going into these fields to just be a JSON 
blob. 

But now my mapping is all wrong and I can't see to find any way to delete the 
fields or change the type of them - all for 5 records!

If I try to update the mapping with this:
curl  -XPUT 'http://hs3:9200/index/user/_mapping'  -d '
{
  "user": {
    "properties": {
      "something_cloud": {
        "type": "string"
      }
    }
  }
}'
 
I get this:
{
  "error": "MergeMappingException[Merge failed with failures {[Can't merge a 
non object mapping [something_cloud] with an object mapping 
[something_cloud]]}]",
  "status": 400
}

It might be possible to reload all 370 million records but I would have to do 
this to another index and then rename it to the index people are expecting to 
use. I can't see a way to rename an index either. 


--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/424e50d7-d2ac-4733-955c-b3eb13fbdfa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/etPan.53295185.2a487cb0.97ca%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to