Yes you can add documents by calling updateDocument -- if no prior
documents matched the deletion Term you provide, nothing is deleted and
your new doc is added.
Hmm are you sure your 2nd update really updated and then added 12 new
docs? Dropping segment 1 makes sense because you deleted the one
While writing some tools to build and maintain lucene indexes I noticed
some strange behavior during testing.
A doc disappears from lucene index while using IndexWriter updateDocument.
The API of lucene 6.4.2 states:
"Updates a document by first deleting the document(s) containing term and
then ad