I am facing an issue with the number precision.
We have a field "consumptionvalue" as float which contains numeric values like 0.001, 0.004, 0.054 etc.
When i try to search for records with below query consumptionvalue:[0 TO 1]
I still get the values out of this range(+ve).
Is there anything else that we need to do to address this precision issue.
Is it conceivable for you to change your type and use scaled_float with a scaling_factor of 1000 instead? That way 0.001 would be stored as 1, 0.054 as 54 and the range queries will become queries on integer numbers, hence much more precise. Can you give it a shot?
Thanks, I have fixed it by changing the type and works fine , for some reason the first record say with value was streamed in as “long “ and hence the mapping for all the values were of type long.
I enabled the mapping as “float” and hence worked
Thanks for your help
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.