I have deleted all 5 offending records but I still can't change the 
mapping. 

Do you suspect that there might be some other record that I missed holding 
at the object type?

A "good" record is simply a json blob of the object instead of the object.

On Wednesday, March 19, 2014 7:12:53 PM UTC+11, David Pilato wrote:
>
> 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 <https://twitter.com/dadoonet> | 
> @elasticsearchfr<https://twitter.com/elasticsearchfr>
>
>
> Le 19 mars 2014 à 08:47:09, Graham Jones ([email protected] <javascript:>) 
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/424e50d7-d2ac-4733-955c-b3eb13fbdfa6%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/424e50d7-d2ac-4733-955c-b3eb13fbdfa6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/d88b2c58-61d9-4fd8-b0f0-490bf3349079%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to