OK -- I like that suggestion Andrew, so I incorporated it into new patch on LUCENE-1354. Now, it's CheckIndex's static main() that does that sleep, and then calls fix. This way you can call fix directly from your code.

Mike

Andrew Zhang wrote:



On Sat, Sep 6, 2008 at 12:01 AM, Michael McCandless <[EMAIL PROTECTED] > wrote:

This definitely makes sense -- there is an issue opened, with initial patch, to make programmatic access to CheckIndex possible, that may already cover this?

Hi,

Thanks for the information!  It's 
https://issues.apache.org/jira/browse/LUCENE-1354

I took a look at the initial patch, but it still sleeps 5 seconds before doing auto fix.

We may make it configurable, or provide a method fix() for end user? i.e.

IndexChecker checker = new IndexChecker(....);
boolean ok = checker.check();
if(!ok) {
  checker.fix(); // or do some other thing?
}


Mike


Andrew Zhang wrote:

Hi,

Currently, CheckIndex.checkIndex sleeps 5 seconds before fixing corrupted index. Does it make sense to make it configurable? Some applications just want to fix it asap.

--
Best regards,
Andrew Zhang

db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Best regards,
Andrew Zhang

db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to