Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Emilda] deleting record: msg#00007

Subject: Re: [Emilda] deleting record
Yannick Majoros wrote:
Hello,

We would like to see records being deleted from the zebra server. It seems Emilda only updates its table to filter the records instead of really deleting them. Our zebra server is queried from other sources than Emilda, and with the current way of deleting books in Emilda, they still show up in requests to the server :-( What can we do?

Ok, I have a workaround for now. But why did you implement it this way? I suppose there are good reasons, but I'm not sure :-/

Anyway, if anyone is interested, here is my workaround (a little ugly, but it works for us):

149a150,155
> #include('php-marc/php-marc.php');
> $control_number=$old['book_control_number'];
> if ($control_number!='') {
>  while(strlen($control_number)<10) $control_number='0'.$control_number;
>  print exec("/www/html/biblio/book_delete.sh $control_number");
> }

#(there are things to fix above to make it work for your installation ; bad)

bookdelete.sh:

#!/bin/sh
rm zebra/records/$1
. zebra/reindex.sh
echo Zebra record $1 deleted



zebra/reindex.sh:

#!/bin/sh
pushd .
cd /www/html/biblio/zebra
/etc/init.d/idzebra stop
/usr/local/bin/zebraidx init
/usr/local/bin/zebraidx -g emilda update records
/usr/local/bin/zebraidx commit
/etc/init.d/idzebra start
/bin/chown -R nobody:nobody /www/html/biblio/zebra
popd


Best regards,

--
----------------------------------------------------------------------
Yannick Majoros http://www.inma.ucl.ac.be/~majoros
Informaticien UCL/INMA-MEMA
4, avenue G. Lemaître
B-1348 Louvain-la-Neuve
Belgium
Tel: +32-10-47.80.10
Fax: +32-10-47.21.80
Si vous avez des problèmes pour afficher ce message (accents qui ne passent pas, 
signature électronique, ...) votre système de mail n'est pas conforme aux standards 
modernes, voir
http://www.inma.ucl.ac.be/~majoros/email.html
#JAPH : http://www.inma.ucl.ac.be/~majoros/japh.txt
----------------------------------------------------------------------


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Emilda-devel mailing list
Emilda-devel@xxxxxxxxxxxxxxxxxx
http://lists.realnode.com/mailman/listinfo/emilda-devel
<Prev in Thread] Current Thread [Next in Thread>