Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: discuss

Search while indexing

 

 

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded


terencekwan at gmail

Aug 23, 2007, 7:55 PM

Post #1 of 2 (738 views)
Permalink
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


marvin at rectangular

Sep 2, 2007, 6:20 PM

Post #2 of 2 (666 views)
Permalink
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 [at] rectangular
http://www.rectangular.com/mailman/listinfo/kinosearch

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.