Discussion:
deleting record
Yannick Majoros
2006-05-15 15:15:01 UTC
Permalink
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?

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
----------------------------------------------------------------------
Yannick Majoros
2006-05-15 16:21:15 UTC
Permalink
Post by Yannick Majoros
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
Post by Yannick Majoros
#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
----------------------------------------------------------------------
Continue reading on narkive:
Loading...