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

Michael Dürig commented on OAK-1763:
------------------------------------

I wouldn't go for the heuristic as it could be wrong in the case where people 
intentionally put numbers in strings. It would e.g. change the place in a list 
of strings where the "numbers would go". Also how would you handle doubles? 
e.g. 2.0E17 < 1.0E18 but "2.0E17" > "1.0E18".

If we want to resolve this by encoding the values to strings such that the 
lexicographical order of the encoded values correspond to the compareTo 
semantics of the underlying values then 
{{org.apache.jackrabbit.oak.plugins.index.property.PropertyIndex#encode}} would 
probably be the right place to do that. 

> OrderedIndex does not comply with JCR's compareTo semantics
> -----------------------------------------------------------
>
>                 Key: OAK-1763
>                 URL: https://issues.apache.org/jira/browse/OAK-1763
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Michael Dürig
>
> The ordered index currently uses the lexicographical order of the string 
> representation of the values. This does not comply with [JCR's compareTo 
> sementics | 
> http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.5.1%20CompareTo%20Semantics]
>  for e.g. double values. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to