Apologies perhaps I am a little confused ..... If you want a float you will need to change the mapping to a float
You will need to reindex your data because the field has already been indexed as a long
There is no magic fix... that field can not be "auto-converted" the precision in the field is already gone but you have the source so you can reindex or re-load the source after you fix the mapping.
| stephenb Stephen Brown Elastic Team Member January 4 |
| - |
ShayWeizman:
The mapping for this field is Long:
Apologies perhaps I am a little confused ..... If you want a float you will need to change the mapping to a float
You will need to reindex your data because the field has already been indexed as a long
There is no magic fix... that field can not be "auto-converted" the precision in the field is already gone but you have the source so you can reindex or re-load the source after you fix the mapping.
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
What you did is perfectly fine... but if you don't define a mapping, elasticsearch will do its best and guess... in this case, it guessed long and you wanted float.
If you are going to work with this data it is best practice, perhaps you should read a little bit about the field types.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.