On Oct 18, 2009, at 1:47 PM, GlenAbbeyDrive wrote:
I commit the IndexWriter every 200 documents in a batch as follows
and you
can see that I reopened the reader after the commit.
private void commit(IndexWriter writer) throws CorruptIndexException {
writer.commit();
if(indexReader!=null)
indexReader.reopen();
}
You should be checking if the reader returned by reopen() is different
than the one you have and then if it is, you need to close the old one
at the appropriate time.
-Grant
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
using Solr/Lucene:
http://www.lucidimagination.com/search
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org