jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <pav...@git.es>
Subject complex SQL search
Date Sat, 25 Nov 2006 11:00:26 GMT
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,
- 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

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.
Paco Avila <pavila@git.es>

View raw message