lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Re: IndexWriter shutdown
Date Mon, 21 May 2007 05:59:14 GMT
Michael Busch wrote:
> Hi,
> if you run Lucene as a service you want to be able to shut it down in a 
> certain period of time (usually 1-2 mins). This can be a problem if the 
> IndexWriter is in the middle of a merge when the service shutdown 
> request is received.

> My question is if people think that the shutdown feature is something we 
> would like to add to the Lucene core? If yes, I can go ahead and attach 
> my code to a JIRA issue, if no I'd like to make the small change to 
> IndexWriter (add the protected method flushRamSegments(triggerMerge)). 
> My approach seems to work quite well, but maybe others (e. g. the 
> IndexWriter "experts") have different/better ideas how to implement it.

If these are conditions that also apply during an optimize(), then yes, I would 
vote for this feature.  I have a Lucene based service and optimisation takes 
over an hour for a freshly created 18GB index with 1.3M documents.

Although optimisation can be scheduled to run at whatever time, it could be 
necessary to shut down the service during the optimisation and this presents a 
problem in how to safely interrupt the optimize process.

Another use this may have is that mini-optimize operations could be done at more 
regular intervals to reduce the time for a full optimize.  I could then schedule 
mini-optimise to run for a couple of minutes at more frequent intervals.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message