saw an earlier post, need to follow this syntax:

//element(*, nt:resource)[jcr:contains(., 'foo')]
//element(*, nt:file)[jcr:contains(jcr:content, 'foo')]

 rgds,
canal




________________________________
From: go canal <[email protected]>
To: [email protected]
Sent: Wednesday, July 29, 2009 12:24:14 PM
Subject: jcr full text search query syntax

read JCR spec...realized that should use jcr:contains not jcr:like......

this one works (but this is for all properties if I understand correctly):

//*[jcr:contains(., 'keyword')]

but this one does not work (what I want to look for is the keyword in the 
content of the file, not any properties):
//*[jcr:contains(@jcr:data, 'keyword')]

so I can not use jcr:data ? how ?

rgds,
canal




________________________________
From: go canal <[email protected]>
To: [email protected]
Sent: Wednesday, July 29, 2009 7:12:43 AM
Subject: jcr full text search query syntax

hello,
trying to get full text search query but just cannot make it work correctly.

this is how I created a file node:
.....
node.setProperty(JcrConstants.JCR_DATA, file.getInputStream());
.....

this is my query:
  //*[jcr:like(@jcr:data, '%Class%')]

it does not return anything.....anything wrong with my query ?
thank you very much,
canal


      

Reply via email to