2 messages in org.apache.jackrabbit.usersjcr:contains and node node (node path)
FromSent OnAttachments
Cédric ChantepieAug 13, 2008 8:28 am 
Marcel ReuteggerAug 15, 2008 7:20 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:jcr:contains and node node (node path)Actions...
From:Cédric Chantepie (ccha@corsaire.fr)
Date:Aug 13, 2008 8:28:16 am
List:org.apache.jackrabbit.users

I'm trying to be able to find node, with xpath (or SQL), whose node name contains searched expression.

For example, with following nodes : /software/ /software/firefox /software/sunbird /software/thunderbird

... I'd like to be able to find sunbird and thunderbird with a xpath query like : //*[jcr:contains(X, '*bird') ;

I've tried "fn:name()" as X but I get an InvalidQueryException ("Unsupported function", probably because of fn:name() nested in jcr:contains()), I've tried "." as X but I doesn't find anything.

In fact it only work if I substitute X by a property name, but I don't know any implicit (auto-created or pseudo one) property contains node node (or node path).

So finally, is there any way to do such query with a standard jackrabbit configuration ? If not is there any "easy" way to define an auto-created property containing node name (so I can search for this property) ? or is there any way to add pseudo property to index by extending SearchIndex (I don't think so as it work on NodeState which doesn't have node name) ?

Thanks for any help, Cédric