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

[jira] [Commented] (SOLR-7581) Function 'sub' returning invalid date subtraction

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

Hoss Man commented on SOLR-7581:
--------------------------------

Functions in solr generally operate on "float" values, and there can be precision loss as a result.

This is the exact reason why the "ms()" function supports a 2 argument form for subtracting dates more accurately then using the "sub()" function...

https://cwiki.apache.org/confluence/display/solr/Function+Queries

> Function 'sub' returning invalid date subtraction
> -------------------------------------------------
>
>                 Key: SOLR-7581
>                 URL: https://issues.apache.org/jira/browse/SOLR-7581
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 5.1
>         Environment: Linux-x64
>            Reporter: Gene Sawyer
>            Priority: Minor
>         Attachments: functionquery_subtraction_bug.png
>
>
> Use of Function 'sub' to determine millis difference between two TrieDateFields returns invalid value.  The determined value appears to be the same, regardless of the true delta in the TrieDates



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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