Hi,
For jcr:contains, the escape character is '\'. Maybe the problem is that
the fulltext index is not configured to index special characters such as %
(it depends on the configuration; see "analyzed"). I would try this:
/jcr:root/myfolder//*[jcr:contains(., 'myword')]
There might be also a difference between Jackrabbit 2.x and Jackrabbit
Oak. Which one (and which version) do you use?
Regards,
Thomas
On 11/01/17 18:18, "Roy Teeuwen" <[email protected]> wrote:
>Hey all,
>
>I am trying to do a query where the actual word I am looking for looks
>like %%myword%%. I have tried the following in XPATH and JCR_SQL2, but it
>seems that the % sign is in both query languages a wildcard, meaning i
>will find all the nodes containing myword instead of %%myword%%. How can
>I escape the % sign in either XPATH or JCR_SQL2?
>
>JCR_SQL2:
> SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/myfolder]) and
>CONTAINS(s.*, '%%myword%%')
>
>XPATH:
> /jcr:root/myfolder//*[jcr:contains(., '%%myword%%')]
>
>Thanks!
>Roy