You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Teodor Rosu (JIRA)" <ji...@apache.org> on 2015/06/22 12:44:00 UTC

[jira] [Commented] (OAK-1077) XPath failures for escaped quotes in full-text search

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

Teodor Rosu commented on OAK-1077:
----------------------------------

1st assertion in the test:
{code:java}
assertQuery("//*[jcr:contains(., 'exact\"quote')]", "xpath", ImmutableList.of("/one"));
{code}
The assertion expects /one as result. I think the correct result would be /content/one.
The reason why the first query statement result is empty is because Oak is initialized with default QueryEngineSettings with fullTextComparisonWithoutIndex=false ( TraversingIndexQueryTest.createRepository ).

2nd assertion in the test:
{code:java}
assertQuery("//*[jcr:contains(., 'exact\'quote')]", "xpath", ImmutableList.of("/two"));
{code}
The only query statement that works as expected looks like this ( two slashes + two single-quotes):
{code}
assertQuery("//*[jcr:contains(., 'exact\\''quote')]", "xpath", ImmutableList.of("/content/two"));
{code}



> XPath failures for escaped quotes in full-text search
> -----------------------------------------------------
>
>                 Key: OAK-1077
>                 URL: https://issues.apache.org/jira/browse/OAK-1077
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, query
>            Reporter: Alex Parvulescu
>            Priority: Minor
>         Attachments: OAK-1077-test.patch
>
>
> It seems that the query doesn't match when a property is _exact\"quote_ or _exact\'quote_



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)