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: Optimising segments merges
Date Tue, 20 Sep 2016 21:39:14 GMT
Lucene takes care of merging ("natural merging") as you add documents,
commit, etc.

If your index is still going to be changing it's best to never
forceMerge and let natural merging run at its defaults.

And, yes, deleted documents are reclaimed by merging.

Mike McCandless

http://blog.mikemccandless.com


On Tue, Sep 20, 2016 at 4:16 PM, lukes <mail2lokesh@gmail.com> wrote:
> Hi,
>
>  In my application i am committing(indexWriter.commit() on every
> single/batch of documents, but now as a result there are lots of segments
> getting generated(One thing can be, i don't do commit, but just add document
> to indexWriter. But now, if system crashes then uncommited documents
> wouldn't make. Please correct me if i am wrong). I can call forceMerge(say
> 5) after every n number of days. Would that be good approach ? As per i
> know, Lucene under the hoods doesn't do segments merge automatically, is
> there a property which can take care of this ?
>
>  Also, merge will take care of deleted documents(freeing up disk space) ?
>
> Regards.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Optimising-segments-merges-tp4296997.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