lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Lucene 2.9: IOException from IndexReader.reopen() - Real time search
Date Thu, 31 Dec 2009 12:45:06 GMT
It sounds like you may be running out of file descriptors -- how many
segments are in your index?

The reopen logic looks correct (you are closing the old reader).  Is
there anything else that may be holding files open?

Have you changed any of IW's settings, eg mergeFactor?

Mike

On Wed, Dec 30, 2009 at 3:21 PM, Kumaravel Kandasami
<kumaravel.kandasami@gmail.com> wrote:
> I am getting IOException when I am doing a "Real-time" search, i.e. I am
> creating a Index using the Index Writer and also opening the Index using
> Index Reader (writer.getReader()) to make sure the document does not exist
> prior adding to the Index file.
>
> The code works perfect fine multiple time indexed across couple of GB data,
> however, on a TB it fails with the exception listed below.
> Any suggestions appreciated. Thanks. Kumar
>
> Code Snippet:
>
>   IndexReader reader2 = reader.reopen();//get
>
>                    if (reader2 != reader) {
>
>                        reader.close();
>                        reader = reader2;
>                        searcher = new IndexSearcher(reader);
>                        reader2 = null;
>                    }
>
>
> Exception:
>
> Exception in thread "main" java.io.IOException: directory
> '/Users/Kumar/Dev/Cust/index/values' exists and is a directory, but cannot
> be listed: list() returned null
>        at org.apache.lucene.store.FSDirectory.listAll(FSDirectory.java:516)
>        at org.apache.lucene.store.FSDirectory.listAll(FSDirectory.java:531)
>        at
> org.apache.lucene.index.IndexFileDeleter.refresh(IndexFileDeleter.java:307)
>        at
> org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:4300)
>        at
> org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:4192)
>        at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:4183)
>        at
> org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:470)
>        at
> org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:444)
>        at
> org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:384)
>        at
> org.apache.lucene.index.DirectoryReader.reopen(DirectoryReader.java:348)
>
> Kumar    _/|\_
> www.saisk.com
> kumar@saisk.com
> "making a profound difference with knowledge and creativity..."
>

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


Mime
View raw message