You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2018/05/14 20:24:00 UTC

[jira] [Commented] (SOLR-12352) Solr mod function query does not yield correct results

    [ 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org