jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppakulski <ppakul...@o2.pl>
Subject Re: complex SQL search
Date Sat, 25 Nov 2006 12:05:57 GMT
Hi,

You can't, joins are not supported as I know.
But since JCR-247 has been resolved  I assume that you should be able to 
execute following XPath query :

/okm:root//element(*,okm:document)[jcr:contains(@okm:name, '*.pdf') and 
jcr:contains(okm:content, 'conejo')]

Przemo Pakulski

>I want to make a complex search in SQL filtered by some fields.
>Someyhing like "I want all the documents which contains the word
>'conejo' and which name ends with '.pdf'"
>
>My node structure is:
>
>[okm:document] > nt:hierarchyNode, mix:referenceable, mix:lockable,
>mix:accessControlled
>- okm:author (string) mandatory
>- okm:name (string)
>- okm:language (string)
>- okm:keywords (string)
>+ okm:content (okm:resource) primary mandatory
>
>I know howto filter by document name:
>
>	SELECT * FROM okm:document WHERE jcr:path LIKE '/okm:root/%' AND
>CONTAINS(okm:name, '*.pdf')
>
>(this is a bit weird becasue CONTAINS(okm:name, '*pdf') returns more
>results)
>
>An howto filter by content:
>
>	SELECT * FROM okm:resource WHERE jcr:path LIKE '/okm:root/%' AND
>CONTAINS(., 'conejo')
>
>But I don't know howto join both queries.
>  
>


Mime
View raw message