Hi Uwe

Thanks in advance for your help. Well, I just tried searching again and it made no difference. My LuceneIndex getReader() function will call writer.getReader() on occasion or return a cached copy. To make sure that IndexReader's are closed when they are no longer needed,
I wrap the IndexReader as follows:

public class VolumeIndexReader extends FilterIndexReader {

    public VolumeIndexReader(IndexReader in) {
        super(in);
    }

    public void finalize() {
        try { in.close(); } catch (Exception e) {}
    }

    public IndexReader reopen(boolean readonly) throws IOException {
        return super.reopen(readonly);
    }
}

You'll notice finalizer calls IndexReader.close(). After users conduct multiple searches, the index reader should be closed in time. Therefore, its confusing to me to see that open handles are still present. Clearly, I am doing something wrong, but what?

Jamie



On 2010/09/29 8:21 PM, Uwe Schindler wrote:
The "deleted" files are only freed by OS kernel if no longer an IndexReader
accesses them. Did you get a new realtime reader after merging and*closed*
the old one?

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail:u...@thetaphi.de

Reply via email to