Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lucene NRT: When to commit?

We're refactoring our Lucene host (Lucene.NET 2.9.2), and are implementing Lucene NRT (Near Realtime).

What is the best time/threshold to commit the changes to disk? Is there a golden rule? If it is when the internal ramdisk holds a certain amount of data, how do I get the size?

Once a commit happens we update our database, so I'm not that fearfull of power failures (once the process starts again, it will reindex those documents that have not been committed).

like image 688
Gideon Avatar asked Feb 21 '26 08:02

Gideon


1 Answers

I have just implemented what sounds like the same scheme in our system. I decided to do a commit when I have over 1000 uncommitted documents. I think the number really depends on how many docs/sec you will be adding. I am also not sure if I can run the commit on a different thread than where I am adding the docs.

like image 119
goalie7960 Avatar answered Feb 27 '26 09:02

goalie7960



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!