On Fri, Apr 3, 2009 at 3:07 PM, daveg0 <[email protected]> wrote: > I am using 1.5.3 and I have the respectDocumentOrder set to false. > > I did a bit of trawling the forum, once I realised it was the NodeIterator > and I found that although respectDocumentOrder=false seemed to have no > effect, if I tagged on a default order-by clause to the end of the query I > got a LazyNodeIterator rather tha a DocumentOrdered one and this helped a > lot with speed. The fianl query went down from over 16 seconds to return > 3300 nodes to 0.8 seconds, so that seems to be the solution - ensure you > have an "order by" clause on all queries (or alternatively the > "respectDocuemntOrder="false" works)
You can also force the use of the lazy iterator by setting "resultFetchSize" of the SearchIndex configuration to some value, eg. 1000. That will "break" the NodeIterator.getSize() method, but in many cases you don't need it. See also http://wiki.apache.org/jackrabbit/Search Regards, Alex -- Alexander Klimetschek [email protected]
