I did a bit more investigating here is something that may help troubleshooting:
- Seems that numbers above 131071 - are impacted. 131071.26 is fine, but 131072.26 is not. 131071 is a large prime and also a Mersenne prime. - 131072.24 gets rounded down to 131072.23. While 131072.26 gets rounded up to 131072.27. Similarily, 131072.76 gets rounded up to 131072.77 and 131072.74 gets rounded down to 131072.73. 131072.49 gets rounded down to 131072.48 and 131072.51 gets rounded up to 131072.52. I haven't validated this code, just doing some manual digging. On Thu, Jul 21, 2016 at 1:48 PM, Nick Vasilyev <nick.vasily...@gmail.com> wrote: > Hi, I am running into a weird rounding issue on Solr 5.2.1. I have a float > field (also tried tfloat), I am indexing 154035.26 into it (confirmed in > the data), but at query time, I get back 154035.27 (.01 more). > Additionally when I query for the document and include this number in the q > parameter, it comes up with both values, .26 and .27. > > I've fed the values through the analyzer and I get this bizarre behavior > per the screenshot below. The field is a single value float or tfloat > field. > > Any help would be much appreciated, thanks in advance > > [image: Inline image 1] >