You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ishan Chattopadhyaya (JIRA)" <ji...@apache.org> on 2016/03/17 04:10:33 UTC

[jira] [Updated] (LUCENE-7111) DocValuesRangeQuery.newLongRange behaves incorrectly for Long.MAX_VALUE and Long.MIN_VALUE

     [ https://issues.apache.org/jira/browse/LUCENE-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ishan Chattopadhyaya updated LUCENE-7111:
-----------------------------------------
    Attachment: LUCENE-7111.patch

Attaching a failing test demonstrating the problem.

> DocValuesRangeQuery.newLongRange behaves incorrectly for Long.MAX_VALUE and Long.MIN_VALUE
> ------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-7111
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7111
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>            Reporter: Ishan Chattopadhyaya
>         Attachments: LUCENE-7111.patch
>
>
> It seems that the following queries return all documents, which is unexpected:
> {code}
> DocValuesRangeQuery.newLongRange("dv", Long.MAX_VALUE, Long.MAX_VALUE, false, true);
> DocValuesRangeQuery.newLongRange("dv", Long.MIN_VALUE, Long.MIN_VALUE, true, false);
> {code}
> In Solr, floats and doubles are converted to longs and -0d gets converted to Long.MIN_VALUE, and queries like {-0d TO 0d] could fail due to this, returning all documents in the index.



--
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