[
https://issues.apache.org/jira/browse/SOLR-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132142#comment-18132142
]
Nick Shanin commented on SOLR-8634:
-----------------------------------
>From code reading against apache/main b73f03976fa, div and sum/add are
>implemented by DivFloatFunction and SumFloatFunction
>(solr/core/src/java/org/apache/solr/search/ValueSourceParser.java:270, 341).
>The open choice is whether these functions should return double, which changes
>the output type of public functions. Option one switches sum/add and div to
>double, which reduces the precision loss on 64-bit fields but changes the
>result type clients receive. Option two keeps float and documents the
>precision limit in the function query reference. Which of these two options do
>you prefer?
🤖 AI-generated 🤖
> Math FunctionQuery improper data types
> --------------------------------------
>
> Key: SOLR-8634
> URL: https://issues.apache.org/jira/browse/SOLR-8634
> Project: Solr
> Issue Type: Bug
> Affects Versions: 5.3, 5.3.1, 5.4, 5.4.1
> Reporter: Curtis Fehr
> Priority: Major
>
> When performing sum(), div(), mod() or other math functions on a 64 bit
> numeric field, the returned values are incorrect. This is due to these
> functions being restricted to using floats. It would make more sense for
> sum() and div() to be using doubles, and mod() to be using longs.
> --the culprit
> http://apaste.info/vJH
> --in case the above link expires
> http://svn.apache.org/viewvc/lucene/dev/tags/lucene_solr_5_3_2/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java?revision=1726288&view=markup&sortby=file
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]