jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (JCR-3347) Searches on properties of type Double give unexpected results
Date Tue, 19 Jun 2012 23:23:42 GMT

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

Jukka Zitting resolved JCR-3347.
--------------------------------

    Resolution: Not A Problem
      Assignee: Jukka Zitting

You need to be careful with data typing in queries because of the way the underlying index
works and because the query as specified has no way of guessing the actual data type of the
referenced "price" property. Using "price > 50.0" is better than "price > 50" as it
uses double comparison instead of integer comparison. Alternatively you can use explicit type
casting for the constant value.
                
> Searches on properties of type Double give unexpected results
> -------------------------------------------------------------
>
>                 Key: JCR-3347
>                 URL: https://issues.apache.org/jira/browse/JCR-3347
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>         Environment: Linux (Ubuntu 12.04), Oracle Java 1.6.0_31
>            Reporter: Felix Oghină
>            Assignee: Jukka Zitting
>
> Example:
> * have a node with a Double property, e.g. price=25
> * The following query returns the node, although it shouldn't:
> SELECT * FROM [nt:unstructured] WHERE price > 50

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message