Custom sorting - memory leaks

2006-08-18 Thread Aleksey Serba
Hi! Could you please read the following discussion in java-user mail list - http://www.gossamer-threads.com/lists/lucene/java-user/35352 You can reproduce OutOfMemory easily. I've attach test files - this is altered DistanceSortingTest example from LIA book. Also you can profile it and see cachi

Re: Custom sorting - memory leaks

2006-08-21 Thread Aleksey Serba
Hi Chris, On 5/17/06, Peter Keegan wrote: Suppose I have a custom sorting 'DocScoreComparator' for computing distances on each search hit from a specified coordinate (similar to the DistanceComparatorSource example in LIA). Assume that the 'specified coordinate' is different for each query. Thi

Re: Custom sorting - memory leaks

2006-08-21 Thread Aleksey Serba
n my custom ScoreDocComparator as described here: http://www.lucenebook.com/blog/errata/2006/03/01/memory_leak.html Peter On 8/21/06, Aleksey Serba <[EMAIL PROTECTED]> wrote: > > Hi Chris, > > On 5/17/06, Peter Keegan wrote: > > Suppose I have a custom sorting 'DocScoreComp

Re: Custom sorting - memory leaks

2006-08-21 Thread Aleksey Serba
Chris, I see what you're saying now ... yes, for cases like this it probably would be useful to a way to prevent the Comparator from being cached ... That's what I'm talking about. I agree this is very uncommon case. perhaps by adding a SortComparatorSource.isCachable() method ... but the cha