jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Lazy Loading and RangeIterator Question
Date Fri, 16 Mar 2007 15:53:47 GMT
Jukka Zitting wrote:
> On 3/15/07, adampp <adamp@moesol.com> wrote:
>> Does lazy loading of search result mean that when you jump around 
>> using the
>> RangeIterator's methods skip only the nodes that get touched by the 
>> iterator
>> actually get loaded?
>>
>> That is, if I have 1 million nodes returned in a QueryResult and only 
>> want
>> to get records 50 through 59, then only those ten records actually get
>> loaded?
> 
> No. The current lazy iterator always starts from the beginning, it's
> only the tail of the result set that is not loaded. In your case the
> iterator would load something like 60+ records, depending on the
> resultFetchSize setting in your SearchIndex configuration.

That's not quite correct. To be more precise it depends on what you mean with 
'record'? If you refer to a javax.jcr.Node instance or a jackrabbit NodeState, 
only the ones are loaded that you actually request through NodeIterator.next().

If you refer to an internal lucene document in the query handler, then Jukkas' 
statement is correct.

The lazy node iterator of the query result only check access rights for the 
nodes from the very beginning of the query result. however that does not require 
to actually load the node. access rights are checked using the NodeId.

regards
  marcel

Mime
View raw message