Hi there :)

I wrote an xpath query to search content in jackrabbit but I can't make it work..

/jcr:root/5512 LG-Ant//element(*,mnt:resource)[(jcr:contains(@jcr:text, 'test sample') OR jcr:contains(@jcr:name, 'test sample') OR jcr:contains(@jcr:owner, 'test sample') OR jcr:contains(@jcr:createdDate, 'test sample') OR jcr:contains(@jcr:lastModifiedDate, 'test sample') OR jcr:contains(@jcr:extension, 'test sample') OR jcr:contains(@jcr:data, 'test sample') OR jcr:contains(@jcr:title, 'test sample') OR jcr:contains(@jcr:from, 'test sample') OR jcr:contains(@jcr:to, 'test sample')) AND @jcr:type != 'null']

I get the following error :

javax.jcr.query.InvalidQueryException: Lexical error at line 1, column 105. Encountered: "c" (99), after : ":" for statement: for $v in /jcr:root/5512 LG-Ant//element(*,mnt:resource)[(jcr:contains(@jcr:text, 'test sample') OR jcr:contains ....

It seems that it doesn't like the OR jcr:contains(...)

Regards,

Gary



Reply via email to