You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Michael McCandless <lu...@mikemccandless.com> on 2008/09/05 18:01:19 UTC
Re: Make auto fix delay configurable in CheckIndex.checkIndex?
This definitely makes sense -- there is an issue opened, with initial
patch, to make programmatic access to CheckIndex possible, that may
already cover this?
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: Make auto fix delay configurable in CheckIndex.checkIndex?
Posted by Andrew Zhang <zh...@gmail.com>.
On Sun, Sep 7, 2008 at 6:54 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:
>
> 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.
Great! I see the fix in the patch. Thanks a lot, Mike!
>
>
> Mike
>
>
> Andrew Zhang wrote:
>
>
>>
>> On Sat, Sep 6, 2008 at 12:01 AM, Michael McCandless <
>> lucene@mikemccandless.com> 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: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
>>
>>
>>
>> --
>> Best regards,
>> Andrew Zhang
>>
>> db4o - database for Android: www.db4o.com
>> http://zhanghuangzhu.blogspot.com/
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
--
Best regards,
Andrew Zhang
db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/
Re: Make auto fix delay configurable in CheckIndex.checkIndex?
Posted by Michael McCandless <lu...@mikemccandless.com>.
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 <lucene@mikemccandless.com
> > 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: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
>
>
> --
> Best regards,
> Andrew Zhang
>
> db4o - database for Android: www.db4o.com
> http://zhanghuangzhu.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: Make auto fix delay configurable in CheckIndex.checkIndex?
Posted by Andrew Zhang <zh...@gmail.com>.
On Sat, Sep 6, 2008 at 12:01 AM, Michael McCandless <
lucene@mikemccandless.com> 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: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
--
Best regards,
Andrew Zhang
db4o - database for Android: www.db4o.com
http://zhanghuangzhu.blogspot.com/