You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by stephan lohwasser <st...@systemone.at> on 2006/06/06 15:13:34 UTC

element order in queries.

hi all,
i have a problem concerning xPath queries for a certain nodetypes and 
their respective order.
all i want to do is find all nodes of a certain nodetype called 
's1Nt:element'. the query i wrote goes like this:

//element(*, s1NT:element)

all elements are located as same name siblings below s1Nt:page nodes, 
ie. there are many page nodes wich can have many element child nodes.

when executing the query i get no results, but the following error 
messages form jackrabbit/lucene (the error  occurrs several times below 
differen page nodes):
2006-06-06 10:11:53,997 ERROR 
[org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl] 
Internal error: unable to determine document order of nodes:
2006-06-06 10:11:53,997 ERROR 
[org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl]    
 Node1: /s1:root/s1:pages/s1:page[3126]/s1:elementRoot/s1:element[3]
2006-06-06 10:11:53,997 ERROR 
[org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl]    
 Node2: /s1:root/s1:pages/s1:page[3126]/s1:elementRoot/s1:element

is it my fault, or a jackrabbit bug?
i also thought it could be due to the fact that we have switched of 
document order in the repository xml:
<Repository>
    [..]
    <Workspace name="default">
       [..]
        <SearchIndex 
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
             [..]
            *<param name="documentOrder" value="false"/>*<!-- improves 
performance on queries-->
        </SearchIndex>
    </Workspace>
    [..]
</Repository>
but: it is not. i have switched it on and the error still occurs.

thanks a lot.
stephan

Re: element order in queries.

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Stefan,

this seems to be a bug in jackrabbit. I was able to reproduce it with a 
small test case and created a jira issue.
See: http://issues.apache.org/jira/browse/JCR-454

you can avoid this bug by disabling the document order on the query 
result. well, you tried that already but the name of the parameter is 
'respectDocumentOrder' and not 'documentOrder'. So what you have to set 
in the index configuration is the following:

     <param name="respectDocumentOrder" value="false"/>


regards
  marcel

stephan lohwasser wrote:
> hi all,
> i have a problem concerning xPath queries for a certain nodetypes and 
> their respective order.
> all i want to do is find all nodes of a certain nodetype called 
> 's1Nt:element'. the query i wrote goes like this:
> 
> //element(*, s1NT:element)
> 
> all elements are located as same name siblings below s1Nt:page nodes, 
> ie. there are many page nodes wich can have many element child nodes.
> 
> when executing the query i get no results, but the following error 
> messages form jackrabbit/lucene (the error  occurrs several times below 
> differen page nodes):
> 2006-06-06 10:11:53,997 ERROR 
> [org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl] 
> Internal error: unable to determine document order of nodes:
> 2006-06-06 10:11:53,997 ERROR 
> [org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl]    
> Node1: /s1:root/s1:pages/s1:page[3126]/s1:elementRoot/s1:element[3]
> 2006-06-06 10:11:53,997 ERROR 
> [org.apache.jackrabbit.core.query.lucene.DocOrderNodeIteratorImpl]    
> Node2: /s1:root/s1:pages/s1:page[3126]/s1:elementRoot/s1:element
> 
> is it my fault, or a jackrabbit bug?
> i also thought it could be due to the fact that we have switched of 
> document order in the repository xml:
> <Repository>
>    [..]
>    <Workspace name="default">
>       [..]
>        <SearchIndex 
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>             [..]
>            *<param name="documentOrder" value="false"/>*<!-- improves 
> performance on queries-->
>        </SearchIndex>
>    </Workspace>
>    [..]
> </Repository>
> but: it is not. i have switched it on and the error still occurs.
> 
> thanks a lot.
> stephan
>