Anyway, this only delays the problem, eventually even your list of keys might be too long.
What is needed is a service which tages some paging parameter, let's say 1000, and the ResourceIterator will only ever contain 1000 keys/documents, when you do
a next on the last one, it retirieves the next block of 1000 resources.
I'm not sure it relates to Terry's suggestion, since ResourceIterator only allows you to step forward, so no Random acccess is ever need.
WH
Vadim Gritsenko wrote:
[EMAIL PROTECTED] wrote:
Has anyone written a better iterator service for Xindice/Xml:db to get over the limitation of throwing an out-of-memory exception if your
Xpath query returns too many results?
It seems that the default behaviour for Xindice at least, is to return ALL the results in the ResourceIterator instead of using some
server-side paging mechanism, so our xindice client code regularly gets nasty out of memory exceptions..
Since we have noe way of knowing if an Xpath is going to return large result sets or not, I would have thought this would be a natural behaviour
for listing/querying a collection.
Anyone have any other ideas to approach this problem?
Does it return all the documents? Or keys only? One idea is to return only keys, this should help a lot.
Vadim
