jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhenhua Guo <jen...@gmail.com>
Subject Re: Question about query support in Jackrabbit 2.0
Date Fri, 18 Dec 2009 16:10:58 GMT
Thanks. I rewrote the query according to your suggestion and replaced
INNER JOIN with OUTER JOIN because some selectors generate empty node
sets.
For a sample query like this:
---------------------------
SELECT categories.*
FROM       [categories] AS categories LEFT OUTER JOIN
                [category] AS category
                ON ISCHILDNODE(category, categories)
---------------------------

If selector "category" generates empty node set, is that OK? It seems
that I always got following exception:
java.lang.NullPointerException
    at org.apache.jackrabbit.core.query.lucene.join.ParentNodeJoin.getMatchingScoreNodes(ParentNodeJoin.java:75)
    at org.apache.jackrabbit.core.query.lucene.join.Join.nextScoreNodes(Join.java:265)
    at org.apache.jackrabbit.core.query.lucene.join.Join.nextScoreNodes(Join.java:261)
    at org.apache.jackrabbit.core.query.lucene.FilterMultiColumnQueryHits.nextScoreNodes(FilterMultiColumnQueryHits.java:63)
   at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.collectScoreNodes(QueryResultImpl.java:347)
    at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.getResults(QueryResultImpl.java:310)
    at org.apache.jackrabbit.core.query.lucene.MultiColumnQueryResult.<init>(MultiColumnQueryResult.java:62)
    at org.apache.jackrabbit.core.query.lucene.QueryObjectModelImpl.execute(QueryObjectModelImpl.java:137)
    at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:127)


Thanks

Gerald

On Fri, Dec 18, 2009 at 7:09 AM, Thomas Müller <thomas.mueller@day.com> wrote:
> Hi,
>
> The ON needs to follow the INNER JOIN clause, like this.
>
> SELECT ... FROM ...
> INNER JOIN ... ON ...
> INNER JOIN ... ON ...
> INNER JOIN ... ON ...
> INNER JOIN ... ON ...
>
> Regards,
> Thomas
>

Mime
View raw message