Re: Optimising segments merges

2016-09-20 Thread lukes
Thanks Mike...

Regards



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Optimising-segments-merges-tp4296997p4297021.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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



Re: Optimising segments merges

2016-09-20 Thread Michael McCandless
Yes, you can ... see the TieredMergePolicy setters.

But again I would strongly recommend using Lucene's defaults here.

Mike McCandless

http://blog.mikemccandless.com

On Tue, Sep 20, 2016 at 5:44 PM, lukes  wrote:
> Thanks a lot Mike. Can we control of how often natural merge should happen,
> or what are the factors that define when to kick off "natural merging" ?
>
> Regards.
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Optimising-segments-merges-tp4296997p4297017.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>

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



Re: Optimising segments merges

2016-09-20 Thread lukes
Thanks a lot Mike. Can we control of how often natural merge should happen,
or what are the factors that define when to kick off "natural merging" ?

Regards.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Optimising-segments-merges-tp4296997p4297017.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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



Re: Optimising segments merges

2016-09-20 Thread Michael McCandless
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  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-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>

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