How to convert a field from type long to double

Hi,
I wanted to get a list of results sorted by a particular field. I am
getting the following error on search from kibana on this.

{
"error" : "ReduceSearchPhaseException[Failed to execute phase [query],
[reduce] ]; nested: ClassCastException; ",
"status" : 503
}

I checked this particular field and found that its been auto mapped to Long
when it should have been Double. Is there any way in which I can covert
these fields to Double and also prevent such a thing from happening in the
future.

Thanks,
Saurabh

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0869c7f7-72a3-4326-b44d-39f01f7e1d47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

If you are indexing the content yourself, then you can define the field
type in your mapping prior to indexing. If you are using Logstash to do the
indexing, you can define your own index template, and then reference it
from your logstash elasticsearch output using the template/template_name
properties. Either way, you will unfortunately need to delete the existing
data with the incorrect type and reindex again using your new mappings.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4516196f-047c-4822-a78f-9f818a463ddf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.