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.
Antony
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]