Re: [jira] Resolved: (LUCENE-709) [PATCH] Enable application-level management of IndexWriter.ramDirectory size

2006-11-22 Thread Ning Li
I was away so I'm catching up. If this (occasional large documents consume too much memory) happens to a few applications, should it be solved in IndexWriter? A possible design could be: First, in addDocument(), compute the byte size of a ram segment after the ram segment is created. In the

Re: [jira] Resolved: (LUCENE-709) [PATCH] Enable application-level management of IndexWriter.ramDirectory size

2006-11-22 Thread Michael Busch
Ning Li wrote: I was away so I'm catching up. If this (occasional large documents consume too much memory) happens to a few applications, should it be solved in IndexWriter? A possible design could be: First, in addDocument(), compute the byte size of a ram segment after the ram segment is

Re: [jira] Resolved: (LUCENE-709) [PATCH] Enable application-level management of IndexWriter.ramDirectory size

2006-11-22 Thread Chuck Williams
Michael Busch wrote on 11/22/2006 08:47 AM: Ning Li wrote: A possible design could be: First, in addDocument(), compute the byte size of a ram segment after the ram segment is created. In the synchronized block, when the newly created segment is added to ramSegmentInfos, also add its byte

Re: [jira] Resolved: (LUCENE-709) [PATCH] Enable application-level management of IndexWriter.ramDirectory size

2006-11-22 Thread Ning Li
There is a flaw in this approach as you exceed the threshold before flushing. With very large documents, that can cause an OOM. This is a good point. I agree that it would be better to do this in IndexWriter, but more machinery would be needed. Lucene would need to estimate the size of the

[jira] Resolved: (LUCENE-709) [PATCH] Enable application-level management of IndexWriter.ramDirectory size

2006-11-21 Thread Yonik Seeley (JIRA)
[ http://issues.apache.org/jira/browse/LUCENE-709?page=all ] Yonik Seeley resolved LUCENE-709. - Resolution: Fixed Committed. Thanks for bearing with me though this Chuck! [PATCH] Enable application-level management of IndexWriter.ramDirectory size