You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Simon Wistow <si...@thegestalt.org> on 2011/06/06 08:16:46 UTC

Expunging deletes from a very large index

Due to some emergency maintenance I needed to run delete on a large 
number of documents in a 200Gb index.

The problem is that it's taking an inordinately long amount of time (2+ 
hours so far and counting) and is steadily eating up disk space - 
presumably up to 2x index size which is getting awfully close to the 
wire on this machine.

Is that inevitable? Is there any way to speed up the process or use less 
space? Maybe do an optimize with a different number of maxSegments?

I suspect not but I thought it was worth asking.





Re: Expunging deletes from a very large index

Posted by Michael McCandless <lu...@mikemccandless.com>.
You can drop your mergeFactor to 2 and then run expungeDeletes?

This will make the operation take longer but (assuming you have > 3
segments in your index) should use less transient disk space.

You could also make a custom merge policy, that expunges one segment
at a time (even slower but even less transient disk space required).

optimize(maxNumSegments) may also help, though it's not guaranteed to
reclaim disk space due to deleted docs.

Mike McCandless

http://blog.mikemccandless.com

On Mon, Jun 6, 2011 at 2:16 AM, Simon Wistow <si...@thegestalt.org> wrote:
> Due to some emergency maintenance I needed to run delete on a large
> number of documents in a 200Gb index.
>
> The problem is that it's taking an inordinately long amount of time (2+
> hours so far and counting) and is steadily eating up disk space -
> presumably up to 2x index size which is getting awfully close to the
> wire on this machine.
>
> Is that inevitable? Is there any way to speed up the process or use less
> space? Maybe do an optimize with a different number of maxSegments?
>
> I suspect not but I thought it was worth asking.
>
>
>
>
>