You never get full control of commits, as Solr will auto-commit anyway whenever the (configurable) input buffer is full. With the current architecture you cannot really trust adds or commits to 100% certainly be successful, because the server may have been restarted between an add and commit() without you noticing etc. So your feeder app should expect failures to happen, including added docs to be committed, and be prepared to re-sumbit any documents needed after a failure. This can be achieved by querying the index at regular intervals to see if you are in sync. Or you could help implement SOLR-1924 to get a reliable callback mechanism :)
-- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com On 18. okt. 2010, at 21.50, Ezequiel Calderara wrote: > I understand, but i want to have control of what is commit or not. > In our scenario, we want to add documents to the index, and maybe after an > hour trigger the commit. > > If in the middle, we have a server shutdown or any process sending a > Shutdown signal to the process. I don't want those documents being commited. > > Should i file a bug issue or an enhacement issue?. > > Thanks > > > On Mon, Oct 18, 2010 at 3:54 PM, Israel Ekpo <israele...@gmail.com> wrote: > >> The documents should be implicitly committed when the Lucene index is >> closed. >> >> When you perform a graceful shutdown, the Lucene index gets closed and the >> documents get committed implicitly. >> >> When the shutdown is abrupt as in a KILL -9, then this does not happen and >> the updates are lost. >> >> You can use the auto commit parameter when sending your updates so that the >> changes are saved right away, thought this could slow down the indexing >> speed considerably but I do not believe there are parameters to keep those >> un-commited documents "alive" after a kill. >> >> >> >> On Mon, Oct 18, 2010 at 2:46 PM, Ezequiel Calderara <ezech...@gmail.com >>> wrote: >> >>> Hi, i'm new in the mailing list. >>> I'm implementing Solr in my actual job, and i'm having some problems. >>> I was testing the consistency of the "commits". I found for example that >> if >>> we add X documents to the index (without commiting) and then we restart >> the >>> service, the documents are commited. They show up in the results. This is >>> interpreted to me like an error. >>> But when we add X documents to the index (without commiting) and then we >>> kill the process and we start it again, the documents doesn't appear. >> This >>> behaviour is the one i want. >>> >>> Is there any param to avoid the auto-committing of documents after a >>> shutdown? >>> Is there any param to keep those un-commited documents "alive" after a >>> kill? >>> >>> Thanks! >>> >>> -- >>> ______ >>> Ezequiel. >>> >>> Http://www.ironicnet.com <http://www.ironicnet.com/> < >> http://www.ironicnet.com/> >>> >> >> >> >> -- >> °O° >> "Good Enough" is not good enough. >> To give anything less than your best is to sacrifice the gift. >> Quality First. Measure Twice. Cut Once. >> http://www.israelekpo.com/ >> > > > > -- > ______ > Ezequiel. > > Http://www.ironicnet.com