lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: RAMDirectory and expungeDeletes()/optimize()
Date Wed, 11 Jul 2012 14:06:58 GMT
What I meant was your original email says "My code looks like",
followed by blank lines, and then "Doesn't it conflict with the
JavaDoc saying:", followed by blank lines. Ie we can't see your code.

However, when I look at your email here at
http://lucene.472066.n3.nabble.com/RAMDirectory-and-expungeDeletes-optimize-td3994350.html#a3994387
I do see the code and javadocs.

But when I look at http://lucene.markmail.org/thread/z5gcms6lp4bo5hfs
and http://mail-archives.apache.org/mod_mbox/lucene-java-user/201207.mbox/%3c1342001903207-3994350.post@n3.nabble.com%3e
they are missing.

Not sure what's going on.  Maybe your email was originally HTML but
got converted to plain text somewhere along the way, losing those
important parts?

Anyway, to try to answer your question: you should be able to simply
call optimize (forceMerge(1)): it does what expungeDeletes does, and
more (merges down to 1 segment).  Yes, it's horribly costly, and so
you should do it rarely, but it sounds like it may be OK in this case
(one time thing before you send a segment off to the main index).
Still, you should test whether it actually helps in the end, because
likely the main index will have to merge these segments anyway (if
enough are added) which'd mean the merging you did on adding them was
redundant (unless bandwidth is very costly...).

Mike McCandless

http://blog.mikemccandless.com

On Wed, Jul 11, 2012 at 9:55 AM, Konstantyn Smirnov <injecteer@yahoo.com> wrote:
> JavaDoc comes from here
> http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/index/IndexWriter.html#expungeDeletes()
>
> other blanks are here because it's groovy :) Or what did you mean exactly?
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/RAMDirectory-and-expungeDeletes-optimize-tp3994350p3994387.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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


Mime
View raw message