jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ati Rosselet <ati.rosse...@gmail.com>
Subject problems with JCR-SQL2/QOM...
Date Sat, 16 Jul 2011 21:04:14 GMT
hi....
basically we have a repo as follows

/month
//day
///hour
///timestamp-nonversionednode
/////entry
///////filename1
///////filename2

etc..
where all are nt:unstructured.
we want to do a fulltext search on entry/files for a given text, but
the results we are getting seem really weird.. and slow..
what we need is to get  all ENTRY elements where either the entry, or
a file's properties match the fulltext search string...

tried this:
"SELECT entrySelector.* FROM [nt:unstructured] AS entrySelector RIGHT
INNER JOIN [nt:unstructured] AS fileSelector ON
ISCHILDNODE(entrySelector, fileSelector) WHERE entrySelector.schemaId
IS NOT NULL AND fileSelector.mediaType IS NOT NULL AND
(CONTAINS(entrySelector.*, 'manning') OR CONTAINS(fileSelector.*,
'manning'))"

and I keep on getting nothing..or  file nodes..
can anyone give me a hint on how to do this?  the 2 IS NOT NULL
constraints are  attempts to limit it to our nodes only.

I can do it like this:
"SELECT * FROM [nt:unstructured] AS entrySelector WHERE
CONTAINS(entrySelector.*, 'wick* -jar')" and then from the nodetype
either get the parent if a file is returned, or the child if the
"unversioned" node is returned but this won't work for more complex
queries

such as :
select ENTRY from UNVERSIONED/ENTRY/FILES where UNVERSIONED (parent)
has properties X,Y,Z and ENTRY has properties AA,BB, and ENTRY matches
fulltext or has FILE(child) nodes matching fulltextsearch...
.
any hints ?  please? pretty please?   and we're stuck with SQL2/QOM a
the moment (although if someone can describe the proper syntax for
xpath/sql, I'd implement that.. I just have to get this working :(

Thanks.
Ati

Mime
View raw message