thomasg wrote:
Hi Marcel,

I've just been looking at a some more typical queries that our system will
need to run and am finding a (related) but more serious problem using
jcr:like. A query such as this works fine:
String queryString = "//element(*, axxia:resource)[jcr:like(@axxia:title,
'%inking%Java%')]";
But how can you specify that you want the document text to be like
'%inking%Java%'? Is it currently the case that jcr:like can only search
properties and not the document text?

Yes, in JSR-170 the jcr:like() function is specified to only work on String properties. And I think this makes sense, because a like operation on a potentially large text which is not tokenized may be quite expensive. you should then rather use jcr:contains which also works on fulltext indexed binary properties.

Using jcr:contains the situation is ok since jcr:contains(., 'word')
searches the document text, even though you can't specify 'ONLY the document
text and not other properties'.

I think this is a reasonable extension that we should consider in jackrabbit.

it is tracked with this issue:
http://issues.apache.org/jira/browse/JCR-415

regards
 marcel

Reply via email to