On Thu, Dec 10, 2009 at 2:05 AM, Ganesh <emailg...@yahoo.co.in> wrote:
> I think, This problem will happen for all sorted fields. I am sorting on 
> integer field.

Integer field should take much less RAM than String, today, for
sorting.  And there's no efficiency gained by doing this globally (per
segment is just fine).

> I ran small test and found after closing all the Database, the WeekHashMap 
> and int[] are not released. Please find the profiler screenshot attached.
>
> Is there any way to release this memory / How to fix it externally with 2.9.1 
> ?

GC will "eventually" reclaim it, but there is this issue in progress:

    https://issues.apache.org/jira/browse/LUCENE-2135

to improve the immediacy, ie, on closing your reader, the FieldCache
entries will be reclaimed.  (There's also an exciting LUCENE-2133 in
progress, with a good improvement to FieldCache, that'll fix the issue
even better).

> If we reopen the DB multiple times whether these objects will be accumulated 
> / All readers are referenced to single cache?

They'll be GCd, as long as your app doesn't hold references to the old
readers.  They're stored in a WeakHashMap, keyed by the IndexReader.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to