[ 
https://issues.apache.org/jira/browse/SOLR-12352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16474752#comment-16474752
 ] 

Shawn Heisey commented on SOLR-12352:
-------------------------------------

Problem confirmed on 6.6.2-SNAPSHOT and 7.3.0.  Added the following parameter 
to a query:

{noformat}
fl=*,foo:mod(1600463487761383425,1526324140364)
{noformat}

That added the following to each document in the result (wt=json:

{noformat}
"foo":1.28043752E12
{noformat}

I found it irritating that I got exponential notation (and the associated loss 
of precision) instead of a true number, but as the issue indicates, the value 
is completely wrong.  The correct value of 1204927482853 was confirmed both in 
a test Java program and with the scientific calculator built into Windows 7.

> Solr mod function query does not yield correct results
> ------------------------------------------------------
>
>                 Key: SOLR-12352
>                 URL: https://issues.apache.org/jira/browse/SOLR-12352
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: gnandre
>            Priority: Minor
>
> It seems mod operation in function query is not working correctly for large 
> numbers.
> "_version_": 1600463487761383425,
> "ms(NOW)": 1526324140364,
> "mod(_version_,ms(NOW))": 1280437520000
>  
> However, mod(1600463487761383425,1526324140364) is 1204927482853.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to