[Zebralist] problem deleting record with zoom

marc marc at indexdata.dk
Wed Jan 17 10:32:31 CET 2007


Paul POULAIN wrote:
> marc a écrit :
>> paul.poulain at free.fr wrote:
>>> Hello,
>>>
>>> I try to delete Koha records with ZOOM, but get the following answer :
>>>> EsRequest  ERROR 224 Cannot delete/update record: does not exist
>> ....
>>
>> Please try version 2.0.8 where this has been fixed - bug #815
> 
> I specified that I tried with <dummy/> without any success, but I gave a 

Well, I missed that info, sorry. so it has nothing to do with bug #815

> try to zebra 2.0.8 :
> - upgrading yaz
> - upgrading zebra
> - reindexing zebra DB
> - doing a small test script :
> #!/usr/bin/perl
> use C4::Context;
> use C4::Biblio;
> 
> use strict;
> 
> my $Zconn=C4::Context->Zconn('biblioserver', 0, 1);
> # parameters : 0 means async=no,  1 means authentification=yes
> my $Zpackage = $Zconn->package();
> $Zpackage->option(action => 'recordDelete');
> $Zpackage->option(record => "<dummy/>");
> $Zpackage->option(recordIdOpaque => '11');
> $Zpackage->send("update");
> $Zpackage->send('commit');
> $Zpackage->destroy();
> $Zconn->destroy();
> 
> Hélas, I still can search & find record 11.
> 

Now I am getting a bit confused here: When you say that you can search 
record '11' - do you refer to the zebra internal sysno ??

Because this is not the same as an external  recordIdOpaque ..

How are the recordId's specified in your config??

Can you show me your record '11' here in the mail ??

Does it contain the recordID somewhere ??

Or are you confusing recordIDOpaque and recordIDNumber ??

When you want to delete/update an existing record,you have two-three 
choices:

1) either you do not specify an recordIdOpaque, but just send the 
original (or updated) record along, where you make sure that the part of 
the record which contains your string bases ID is unaltered,
This requires that the recordID setting is found in zebra.cfg, see
http://www.indexdata.com/zebra/doc/generic-ids.tkl

2) you do externally provide your recordIdOpaque - both under insert, 
update and delete. No 'recordID' setting is needed in zebra.cfg
This is the use case where you for example have all records in a 
relational DB, and mirror them out to Zebra for fast full-text indexing.

3) You let Zebra deal with the inserts as you wish, and use the 
'recordIDNumber'  to point to the Zebra internal sysno (which I believe 
is your '11', but I can't know..) for an update or delete. You are not 
allowed to use this for an insert, as Zebra generates it's own ID's.


Then, there are some other traps to be aware of:

3) you need a general and global indexing filter instruction like
  recordType: grs.xml

  the specific
  recordType.xml: grs.xml

  will not do, as there is no file suffix in extended services


See the full information at
http://www.indexdata.com/zebra/doc/administration-extended-services.tkl

Hope that helps ...



Marc Cromme, Index Data




> 
> here are my zebra logs :
>> 16:32:05-16/01 zebrasrv(8) [session] Session - OK 8 tcp:::1 11204
>> 16:32:05-16/01 zebrasrv(8) [request] Auth idPass kohaadmin -
>> 16:32:05-16/01 zebrasrv(8) [request] Init OK - ID:81/81 
>> Name:ZOOM-C/YAZ Version:1.108/2.1.46
>> 16:32:05-16/01 zebrasrv(8) [log] function: 1
>> 16:32:05-16/01 zebrasrv(8) [log] Waitaction: 2
>> 16:32:05-16/01 zebrasrv(8) [log] Received DB Update
>> 16:32:05-16/01 zebrasrv(8) [log] action
>> 16:32:05-16/01 zebrasrv(8) [log] recordDelete
>> 16:32:05-16/01 zebrasrv(8) [log] database: biblios
>> 16:32:05-16/01 zebrasrv(8) [log] enabling shadow 
>> spec=/home/zebradbs/sanop/biblios/shadow:4G
>> 16:32:05-16/01 zebrasrv(8) [log] cache_fname = 
>> /home/zebradbs/sanop/biblios/shadow/cache
>> 16:32:05-16/01 zebrasrv(8) [log] record 0 type XML
>> 16:32:05-16/01 zebrasrv(8) [log] 8 bytes
>> <dummy/>
>> 16:32:05-16/01 zebrasrv(8) [log] key_block_create t=1
>> 16:32:05-16/01 zebrasrv(8) [log] sorting section 1
>> 16:32:05-16/01 zebrasrv(8) [log] writing section 1
>> 16:32:05-16/01 zebrasrv(8) [log] finished section 1
>> 16:32:05-16/01 zebrasrv(8) [log] Iterations            10
>> 16:32:05-16/01 zebrasrv(8) [log] Distinct words         6
>> 16:32:05-16/01 zebrasrv(8) [log] Updates                4
>> 16:32:05-16/01 zebrasrv(8) [log] Deletions              1
>> 16:32:05-16/01 zebrasrv(8) [log] Insertions             1
>> 16:32:05-16/01 zebrasrv(8) [log] Records: 0 i/u/d 0/0/0
>> 16:32:05-16/01 zebrasrv(8) [request] Extended Service: Update (failed)
>> 16:32:05-16/01 zebrasrv(8) [request] EsRequest  ERROR 224 Cannot 
>> delete/update record: does not exist
>> 16:32:05-16/01 zebrasrv(8) [session] Connection closed by client
> 


-- 

Marc Cromme
M.Sc and Ph.D in Mathematical Modelling and Computation
Senior Developer, Project Manager

Index Data Aps
Købmagergade 43, 2
1150 Copenhagen K.
Denmark

tel: +45 3341 0100
fax: +45 3341 0101

http://www.indexdata.com

INDEX DATA Means Business
for Open Source and Open Standards







More information about the Zebralist mailing list