jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: EQUALS instead of CONTAINS ?
Date Wed, 18 Apr 2007 12:00:26 GMT
rainer wrote:
> is there sth. like EQUALS in JCR... ?

yes there is. e.g.

select * from nt:resource where jcr:mimeType = 'text/html'


//element(*, nt:resource)[@jcr:mimeType = 'text/html']

> i tried to use LIKE but it needs an attribute (name) -> WHERE name LIKE
> 'foo'
> i need this with a wildcard for all attibutes...
> The problem i have to solve is the following:
> i have to find handles that not only CONTAINS(*,'foo')  --> cause this also
> finds 'foooooooo'

with the default analyzer configured this shouldn't actually be the case ('foo' 
and 'fooooo' are distinct tokens), unless you have:

...WHERE CONTAINS(*, 'foo*')

> i only want to get those pages, that exactly match 'foo' in any property...

that's not possible with a JCR query. you have to name the properties individually:

where propA = 'foo' or propB = 'foo' or propC = 'foo' ...


View raw message