lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: IndexReader.delete(int) not working for me
Date Wed, 05 Mar 2003 17:31:59 GMT
Joseph Ottinger wrote:
> I've got a versioning content system where I want to replace documents in
> a lucene repository. To do so, according to the FAQ and the mailing list
> archives, I need to open an IndexReader, look for the document in
> question, delete it via the IndexReader, and then add it.
> 
> This shouldn't replace the document per se - it should, however, free the
> index entry (for reuse by documents added later) as I understand it. It
> should also mark the document as deleted. A query still may return the
> document (again, as I understand it), requiring a filter to make sure
> deleted documents aren't returned.

Searches results do not include deleted documents, so you do not need to 
explicitly filter for them.  After a document is deleted, the space 
consumed by it may not be reclaimed for a while, and some term 
statistics may not be updated immediately, but Lucene never returns 
references deleted documents.

Doug



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message