Mailing List Archive

Search while indexing
Is it possible to do search while indexing?

I have one process which is updating and indexing the directory (which takes
about 15 minutes every hour) - open_index, add, add, add, ... close_index.

On any window, I run the command line search and it says:

Index doesn't seem to contain any data at
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/KinoSearch/Index/IndexReader.pm
line 106.
eval {...} called at ... IndexReader.pm line 78.

My guess is that you cannot do search and index at the same time because the
directory is locked. Is there anyway to work around it?

Thanks

TK


--
Terence Kwan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.rectangular.com/pipermail/kinosearch/attachments/20070823/6d0b07a6/attachment.htm
Re: Search while indexing [ In reply to ]
On Aug 23, 2007, at 7:54 PM, Terence Kwan wrote:

> Is it possible to do search while indexing?
>
> I have one process which is updating and indexing the directory
> (which takes about 15 minutes every hour) - open_index, add, add,
> add, ... close_index.

If you're building the index from scratch, then as soon as you
clobber the existing index, no new Searchers can be created until the
build completes. You may wish to build in another directory, then
swap it into place.

Another possibility, so long as you are not on NFS, is to open a
Searcher in a persistent application; it will hold open the necessary
filehandles as long as it is alive, and the files will truly be
reclaimed by the OS only after the last Search object referencing
them is destroyed.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/



_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch