Mailing List Archive

how to tell whether an index is being updated
Hi Marvin,

Is there a proper way of finding out whether an index is being updated and
therefore having the front-end app display a message to user ("this index is
being updated; please try again later")? I notice that if an index is being
updated, the user can still perform a search but the app will return no
results, giving the fault impression that there are no hits.

I tried doing this by testing the return value of the following call, but it
seems to be the same return value either way:

my $invindexer = KinoSearch::InvIndexer->new(...)

Thanks!
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.rectangular.com/pipermail/kinosearch/attachments/20070327/d0b2f318/attachment.htm
how to tell whether an index is being updated [ In reply to ]
On Mar 27, 2007, at 7:42 PM, Eric LIAO Kehuang wrote:
> Is there a proper way of finding out whether an index is being
> updated and therefore having the front-end app display a message to
> user ("this index is being updated; please try again later")? I
> notice that if an index is being updated, the user can still
> perform a search but the app will return no results, giving the
> fault impression that there are no hits.
Presumably you are clobbering the old index? I'd suggest writing to
a temp location first, and then moving it into place when it's done.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
how to tell whether an index is being updated [ In reply to ]
Marvin,

I am incrementally updating an existing index because creating new ones
takes too long. Is there a condition to test to find out whether the index
is busy?

Thanks
Eric

On 3/28/07, Marvin Humphrey <marvin@rectangular.com> wrote:
>
>
> On Mar 27, 2007, at 7:42 PM, Eric LIAO Kehuang wrote:
> > Is there a proper way of finding out whether an index is being
> > updated and therefore having the front-end app display a message to
> > user ("this index is being updated; please try again later")? I
> > notice that if an index is being updated, the user can still
> > perform a search but the app will return no results, giving the
> > fault impression that there are no hits.
> Presumably you are clobbering the old index? I'd suggest writing to
> a temp location first, and then moving it into place when it's done.
>
> Marvin Humphrey
> Rectangular Research
> http://www.rectangular.com/
>
>
>
> _______________________________________________
> KinoSearch mailing list
> KinoSearch@rectangular.com
> http://www.rectangular.com/mailman/listinfo/kinosearch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.rectangular.com/pipermail/kinosearch/attachments/20070328/2a95d813/attachment.htm
how to tell whether an index is being updated [ In reply to ]
On Mar 28, 2007, at 12:35 AM, Eric LIAO Kehuang wrote:

> I am incrementally updating an existing index because creating new
> ones takes too long.

Something is screwy, then. Updating an index should not affect
searching.

An IndexReader reads the index as it exists at a point in time.
Unless you are on NFS, the files it needs don't go away before the
Reader does. And opening a new Reader during indexing should read
the most recent version of the index.

I believe you're on Windows and using version 0.15, correct? Files
only get deleted during InvIndexer->finish(), or, if the argument
"create" is set to 1, during InvIndexer->new() when it calls
FSInvIndex->new().

Can you please try to produce a failing test case demonstrating this
problem?

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
how to tell whether an index is being updated [ In reply to ]
Marvin,

Yes I'm on Windows, but the version is 0.14. I hope there's no difference
between 0.14 and 0.15 as far as the question at hand goes. I'll look into
it like you suggested.

Thanks
Eric


On 3/28/07, Marvin Humphrey <marvin@rectangular.com> wrote:
>
>
> On Mar 28, 2007, at 12:35 AM, Eric LIAO Kehuang wrote:
>
> > I am incrementally updating an existing index because creating new
> > ones takes too long.
>
> Something is screwy, then. Updating an index should not affect
> searching.
>
> An IndexReader reads the index as it exists at a point in time.
> Unless you are on NFS, the files it needs don't go away before the
> Reader does. And opening a new Reader during indexing should read
> the most recent version of the index.
>
> I believe you're on Windows and using version 0.15, correct? Files
> only get deleted during InvIndexer->finish(), or, if the argument
> "create" is set to 1, during InvIndexer->new() when it calls
> FSInvIndex->new().
>
> Can you please try to produce a failing test case demonstrating this
> problem?
>
> Marvin Humphrey
> Rectangular Research
> http://www.rectangular.com/
>
>
>
> _______________________________________________
> KinoSearch mailing list
> KinoSearch@rectangular.com
> http://www.rectangular.com/mailman/listinfo/kinosearch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.rectangular.com/pipermail/kinosearch/attachments/20070328/00df60ac/attachment.htm