jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: XPath Search with negate in contains
Date Fri, 16 May 2014 20:51:19 GMT
On 09.05.2014, at 07:20, hsp <piccinatto@ibest.com.br> wrote:

> I did not find any option to negate a contains in XPath, I tried:

It's "not()" [1].

> jcr:contains(.,'NOT \|') -> returns nodes with NOT in index...
> jcr:contains(.,'- \|') -> returns none
> and some other combinations...

This might work:

not( jcr:like(fn:name(), "%|%") )

otherwise (if like doesn't work with fn:name):

not( jcr:contains(. "|") )

but "." in the contains referes to the aggregated full text index for one node, so this does
look into more than just the node name, but properties of the node as well.

[1] http://www.day.com/specs/jcr/1.0/6.6.4.8_Boolean_Functions.html

Cheers,
Alex

Mime
View raw message