I would try searching the entire JCR codebase for the word "escape" or for "%" char, for now, but I bet in under 24hrs one of the better experts than me answers. It's either a simple solution or else a plain bug in the search JCR core, but i don't know because i haven't "fixed this" in my own JCR code yet either.
Best regards, Clay Ferguson [email protected] On Wed, Jan 11, 2017 at 2:15 PM, Roy Teeuwen <[email protected]> wrote: > Yes i did ;), same results > > Greets, > Roy > > On 11 Jan 2017, at 18:30, Clay Ferguson <[email protected]> wrote: > > > > did you try this? > > > > CONTAINS(s.*, '\%\%myword\%\%') > > > > Best regards, > > Clay Ferguson > > [email protected] > > > > > > On Wed, Jan 11, 2017 at 11:18 AM, 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 > >
