jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Chantepie <cchante...@corsaire.fr>
Subject jcr:contains and node node (node path)
Date Wed, 13 Aug 2008 15:28:39 GMT
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


Mime
View raw message