[
https://issues.apache.org/jira/browse/JCR-1408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marcel Reutegger resolved JCR-1408.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.5
Applied patch to trunk.
Thank you for reporting this issue.
svn revision: 630140
> Invalid query results when using jcr:like with a case transform function and
> a pattern not starting with a wildcard
> -------------------------------------------------------------------------------------------------------------------
>
> Key: JCR-1408
> URL: https://issues.apache.org/jira/browse/JCR-1408
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-core, query
> Affects Versions: 1.4, core 1.4.1
> Environment: Ubuntu gutsy, Sun JDK 1.5.0_08
> Reporter: Sébastien Launay
> Fix For: 1.5
>
> Attachments: jackrabbit-1.4.x-query-like.patch
>
>
> If the repository contains nodes with the following value for the property
> name :
> john
> JOhn
> joe
> Joey
> and we run the following query :
> //element(*, document)/*[jcr:like(fn:lower-case(@name), 'joh%')]")
> then all the previous nodes will match especially the last 2 nodes.
> The reason is the use of two range scans from the lucene term index:
> ..._name_jOH
> ..................
> ..._name_joh_
> and
> ..._name_JOH
> ..................
> ..._name_Joh_
> The first range will contains ..._name_joe property and the second will
> contains ..._name_Joey.
> But the pattern 'joh%' and so the regexp '.*' because of the range scan will
> match
> the substring values of the properties ('' in the first range and 'y' in the
> second range).
> The solution is to use the full pattern (ie 'joh.*') for matching each
> properties.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.