lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: IndexWriter deleteDocuments
Date Wed, 30 Jan 2013 14:27:14 GMT
Documents are still only "marked' as deleted.

expungeDeletes was renamed to forceMergeDeletes, but it's a horribly,
horribly costly operation.

Normal merging will collapse the deletes anyway, and the default merge
policy favors segments with more deletions ... so you shouldn't have
to force merge them away yourself.

Mike McCandless

On Wed, Jan 30, 2013 at 8:26 AM, Bernd Müller <> wrote:
> Hello,
> In my index, I have documents identified by a field with their unique
> identifier. Now, I tried to delete documents having such a unique
> identifier using deleteDocuments(Term t). If I test the IndexWriter
> for deletions with hasDeletions(), it tells me true. Even if I commit
> and close the index, open, delete, and close again, it still
> hasDeletions() being true.
> In previous lucene versions, there was something like expungeDeletes()
> to actually delete the documents that I deleted.
> How can I delete a document with my IndexWriter in a way that it is
> really deleted and not just flagged as deleted?
> Regards,
>   Bernd
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message