: Closing an IndexReader only flushes the list of deleted docids to the
: index... it doesn't actually delete them.  Deletions only happen when
: the deleted docs segment is involved in a merge, or when an optimize
: is done (which is a merge of all segments).

just to clarify slightly because "deleted" can be differnet things to
differnet people...

think of executing a delete command as "logically" deleting them, by
adding them to a list of documents to be ignored by IndexSearchers.  a
commit will ensure that deleted docs list is written to disk, and reopen
the IndexSearcher which will treat any documents in that list as if they
didn't exit.  When segment merges happens sometime in the future document
information is "physically" deleted in the sense that the data associated
with docs i nthe deleted list is actually removed from the index files,
and disk/ram space is freed up.




-Hoss

Reply via email to