[
https://issues.apache.org/jira/browse/OAK-4080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298189#comment-15298189
]
Thomas Mueller commented on OAK-4080:
-------------------------------------
The following characters are not currently supported:
{noformat}
Char 64 (@):
javax.jcr.query.InvalidQueryException:
java.text.ParseException:
Query: //element(*, cq:Page)[jcr:contains(., '@')]; expected: identifier
Chars 32, 34, 39, 45, 92, 94 ( "'-\^):
javax.jcr.query.InvalidQueryException:
java.lang.IllegalArgumentException: Invalid expression: 'x'
Chars 40, 41, 43, 60, 61, 62, 91, 93, 123, 125, 126 (()+<=>[]{}~):
java.lang.RuntimeException:
INVALID_SYNTAX_CANNOT_PARSE:
Syntax Error, cannot parse x
{noformat}
> Fulltext queries: compatibility for "contains" with special characters
> ----------------------------------------------------------------------
>
> Key: OAK-4080
> URL: https://issues.apache.org/jira/browse/OAK-4080
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: query
> Reporter: Thomas Mueller
> Fix For: 1.6
>
>
> Currently, "jcr:contains" with special characters don't work the same when
> using a Lucene fulltext index compatVersion 2 compared to using compatVersion
> 1 or Jackrabbit 2.x.
> This needs to be documented. Also, it might make sense to provide a
> compatibility flag, so that behavior is the same as with the old versions, at
> least as much as possible, even thought new features would not be supported.
> The one example I know is using "\*" as in:
> {noformat}
> SELECT * FROM [nt:base] AS c WHERE CONTAINS(c.[test], 'athxv:!*')
> {noformat}
> With compatVersion 2, the "\*" needs to be escape as follows, in order to
> match properties with exactly this text:
> {noformat}
> SELECT * FROM [nt:base] AS c WHERE CONTAINS(c.[test], 'athxv:!\*')
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)