[Koha] BiblioAddsAuthorities: SimpleSearch failing (previously "bulk BiblioAddsAuthorities?")

LAURENT Henri-Damien henridamien.laurent at biblibre.com
Tue Mar 8 10:05:12 NZDT 2011


Le 07/03/2011 21:55, Peter Huerter a écrit :
> Dear Koha developers,
> 
> I would like to bump my original post (previous title "bulk
> BiblioAddsAuthorities").  
> 
> addbiblio.pl appears to be called when one chooses "Edit Record" from the
> koha admin biblio details page.  This code appears to call
> BiblioAddAuthorities and I *really like* the result.  Authorities are
> generated for authors, subjects, and secondary authors.  Even better the
> string "machine generated" is used in the added authorities to mark them as
> being created automatically.  This is great!  I would like to do this in
> batch for all of our biblios since we manage our own authorities in house. 
> I would really like to make use of this feature since it works so well in
> the singleton case.  However I have run into problems writing a perl script
> to do this.  
> 
> I have a script working that iterates through a list of biblios calling
> BiblioAddAuthorities however I have one problem related to bulk processing,
> a temporal issue, or perhaps a caching issue(?).
> 
> BiblioAddAuthorities relies on SimpleSearch to search for existing
> authorities.  However when I am processing in batch SimpleSearch fails for
> *recently added authorities*.  I think SimpleSearch relies on Zebra.
> 
> I've tried adding dbh->commits, and re-indexing zebra before processing each
> biblio, but this does not seem to solve my problem.  When my script exits,
> SimpleSearch finds recently added authorities.  It is almost like there is a
> lazy write, or caching middle-layer getting in the way (but probably working
> very well for it's intended purpose of course).
> 
> It seems that recently added authorities are stuck in some sort of cache
> somewhere?  At the SQL level? At the Zebra layer?
> 
> How do I make sure that Zebra, and SQL are written to so that SimpleSearch
> has the latest up-to-date data to base it's search on?
SimpleSearch is relying on zebra.
In order to make sure that it is indexed, you should index before your
bulk edition goes.
Hope that helps.
-- 
Henri-Damien LAURENT


More information about the Koha mailing list