I'm confused by what you mean - there is no difference between something being marked as deleted and deleted. (Since it's not removed from the index until optimization)
I've found that unless I close(), the document isn't even marked for deletion. And if I recall, I think I also had to close the Directory, but that may not be true. -----Original Message----- From: Dan Liu [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 3:09 PM To: java-user@lucene.apache.org Subject: RE: delete and optimize The document is markded as "deleted" when reader.delete(i) is called. It is actually deleted from index when reader.close(). The deleted douments seems put in a separate file with extension ".del" in the index folder. When optimiation happens after deletion, the ".del" file is gone, and Document number are reclaimed. Aviran http://www.aviransplace.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]