Details
-
Bug
-
Resolution: Done
-
Major
-
2.2.0.Final
-
None
Description
This started out as a StackOverflow question: http://stackoverflow.com/questions/3572258/
When issuing a 'jcr:contains' clause (in either XPath or JCR-SQL2), and this clause contains a hyphen, the query will work under some situations but not others. For example, consider content that contains "4-speed" and "5-speed". A query containing this clause will work successfully:
... jcr:contains(//*,'"5-speed"') ...
Even these query that uses a wildcard does work:
... jcr:contains(//,'"5-sp"') ...
or
... jcr:contains(//,'"-sp*"') ...
However, consider content that contains "Sophie-Anne" and "Sophie-Allen". This query does work:
... jcr:contains(//*,'"sophia-anne"') ...
while any queries that include the hyphen and a wildcard do not work:
... jcr:contains(//*,'"sophia-anne"') ...
or
... jcr:contains(//,'"sophia-a"') ...