WARNING: the index does not currently record which documents were added as a block. Today this is fine, because merging will preserve the block (as long as none them were deleted). But it's possible in the future that Lucene may more aggressively re-order documents (for example, perhaps to obtain better index compression), in which case you may need to fully re-index your documents at that time.
See {@link #addDocument(Document)} for details onindex and IndexWriter state after an Exception, and flushing/merging temporary free space requirements.
NOTE: tools that do offline splitting of an index (for example, IndexSplitter in contrib) or re-sorting of documents (for example, IndexSorter in contrib) are not aware of these atomically added documents and will likely break them up. Use such tools at your own risk!
NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.
@throws CorruptIndexException if the index is corrupt @throws IOException if there is a low-level IO error @lucene.experimental
|
|
|
|