[Zebralist] Deleteing a record by custom ID

Merijn van den Kroonenberg merijn at web2all.nl
Fri Nov 16 10:59:07 CET 2007


On Thu, November 15, 2007 17:05, Hans Erik Büscher wrote:
>
> For good reasons I think you will need to enter a  password file in
> zebra.cfg (param passwd:)

Thank you for the advice, but I am already using a password file.

>
> passwd: zebrapass
> perm.cat: w
> perm.search: r
>
>
> storekeys: 1
> storedata: 1
> recordId: (bib1,Control-number-local)
>
> zebrapass format is: cat:psw for ES
> search:psw for search
>
> And use the login param in yaz_connect(address,array("user" =>
> "cat/search","password" => "psw")) if you use php_yaz. It does not really
> matter which field you use as ID as long as it is fairly unique and it is
> mandatory for each record

Yes, but my question was about "how" I should provide this ID during a 
delete request.

However, I found my answer in an earlier message in this list:
http://lists.indexdata.dk/pipermail/zebralist/2007-January/001385.html

I should not use the recordIdOpaque param at all, but just specify the 
record param with a very basic XML containing only the ID. Example:
$args = array (
    "action" => "recordDelete",
    "record" => "<record><id>41400</id><record>"
);
yaz_es($yazcon, "update", $args);

Then it works like a charm.

>
> §;>heb
>
>
>
>
>> Hello list,
>>
>>
>> I have records indexed into zebra (using zebraidx) with the following
>> config entries:
>>
>>
>> recordId: (bib1,Doc-id)
>> storeKeys: 1
>>
>>
>> Is it possible to delete a record using my own id (Doc-id) with a yaz
>> client (extended services)?
>> It looks like I can do a ES update request with recordDelete action, and
>> I
>> wonder if the 'recordIdOpaque' param is the same ID as the recordId
>> specified in the config.
>>
>> I have been trying, but thus far no success, so I wondered if I was on
>> the right track. I am using php_yaz to do the querying.
>>
>> Greetings,
>> Merijn van den Kroonenberg
>>
>>
>> Web2All B.V.
>> Telefoon: +31 475 775511
>> Fax:        +31 475 338290
>> Email:      merijn at web2all.nl
>> Website:  http://www.web2all.nl
>> 



More information about the Zebralist mailing list