Hello Yonik, Thanks, it explains my issue and that's definitely a hit - I tried to sort by filePath field which can be 100 bytes at average meaning 400M RAM for the cache + IO excess to load them from 3G index. I wish this caching were configurable as lazy or switched off, do you know if that's possible?
>> I've tried to utilize Lucene's sorting function YS> [...] >> But on large index (4mln docs) I >> get big delay with CPU to 100% and then OutOfMemoryError even when >> there's only 1 document in the resultset! YS> The first time you sort on a field, a FieldCache entry is populated, YS> enabling random access to that field value. A single int field for a YS> 4M index == int[4000000] == 16MB memory. -- Best regards, Artem mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]