jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parvulescu <alex.parvule...@gmail.com>
Subject Re: problems with JCR-SQL2/QOM...
Date Mon, 18 Jul 2011 16:26:22 GMT
hi Ati,

what version of JR are you using?

the sql2 joins are still under work right now, see [0], I'm not sure if
using the trunk, or patching the version of JR you are using is an option
for you.

About the xpath syntax: you can always take a look at the JR tests [1] to
learn more, but the problem is there are no joins in xpath, so you have to
improvise a little bit.

[0] https://issues.apache.org/jira/browse/JCR-3000


On Sat, Jul 16, 2011 at 11:04 PM, Ati Rosselet <ati.rosselet@gmail.com>wrote:

> 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 :
> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message