lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amin Mohammed-Coleman <>
Subject Batch Operation and Commit
Date Thu, 26 Aug 2010 17:42:32 GMT

I have a list of batch tasks that need to be executed.  Each batch contains 1000 documents
and basically I use a RAMDirectory based index writer, and at the end of adding 1000 documents
to the memory  i perform the following:


Do I then need to explicitly do an indexWriter.commit()?  It seems as though if I don't do
an explicit commit the documents aren't added to the index (I've inspected via Luke).  I would've
thought that the indexWriter.addIndexesNoOptimize would not require me to call the commit
explicitly.  Is this a correct assumption? or should i call the commit explicitly for my disk
based index writer?  

The main idea behind this is that each batch can be executed in a seperate thread and there
is only on shared index writer.  

Any help would be appreciated.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message