I have some questions regarding QueryResult.getRows() and 
QueryResult.getNodes().

>From a brief scan of the Jackrabbit implementation, I believe it is possible 
>to repeatedly call each of the above methods on a given QueryResult instance 
>and in each case receive a new RowIterator or NodeIterator.  From reading the 
>JCR spec., I would assume this behaviour too but it is not explicit.

However, from an implementation perspective, doesn't this mean that either the 
complete result set has to be kept somewhere (memory/disk..) or the query 
re-executed for each call to getRows or getNodes.  I think JackRabbit holds it 
in memory; has this been an issue for large result sets?

I only ask as I'm currently implementing the QueryManager façade onto our own 
repository implementation and can go either way - or is the spec. more 
flexible? meaning that getRows()/Nodes() can return the same Iterator, and 
Query.Execute has to called again to get a new Iterator.

Regards,
David Caruana
www.alfresco.org


Reply via email to