Christoffer Landtman wrote:
Wolfgang Pichler wrote:
1)
zebra_db to be honoured when adding books
logs show up :
[Sat Oct 09 15:36:37 2004] [error] [client 62.46.64.189]
15:36:37-09/10: [log][app2] zebra_start
/home/idzebra/emilda/zebra.cfg, referer:
https://grass.ivv.tuwien.ac.at/emilda/book_add
[Sat Oct 09 15:36:37 2004] [error] [client 62.46.64.189]
15:36:37-09/10: [log] Database(s) selected: Default, referer:
https://grass.ivv.tuwien.ac.at/emilda/book_add.php?id=1860095909&
BEFORE and STILL AFTER MODIFYING
my $zebra = IDZebra::Session->open(
configFile => $config{'zebra_path'}.$config{'zebra_config'},
shadow => 1,
groupName => 'emilda',
databaseName => $config{'zebra_db'}, ## line in
question
) or die "Could not initialize Zebra session: $!";
RESUMEE :
spurious messages, but things seem to work right :-)
since database is implicitly selected in zebra.cfg via
'emilda.atabase: emilda' there is no need to specify database name,
but this funny log-message might cause doubts :-)
I would say, don't fix if it ain't broken ;-)
One could ask on the Zebra list if there is some bug in the logging
that it reports the wrong database, since all records are added into
the correct database and it just informs You wrong.
it is broken. and it has to be fixed.
IDZebra::* seems somehow croaked ... much todo for maintainers ...
WORKAROUND:
patch which will honour database not Default (verified with yaz-client
on local test-install)
MY ENVIRONMENT
a) configs altered : zebra.cfg : "emilda.database: emilda"
b) configs altered : value of config_key 'zebra_db'
---
2)
Undefined variable: rpn in /home/httpd/emilda/lib/search.inc on line
232, referer: https://grass.ivv.tuwien.ac.at/emilda/book_add.php
Undefined variable: rpn in /home/httpd/emilda/lib/search.inc on line
244, referer: https://grass.ivv.tuwien.ac.at/emilda/book_add.php
AND
when doing any search (e.g. mandatory before book_add) i get error
YAZ error: 10010 (Invalid query) (Host: localhost:3000/emilda) (Query: )
to be able to add books i had to tweak code in book_add to ignore
errors -
i know this is a design-feature, and there has been discussion about
this, but maybe someone else feels unhappy about the design of the
"add book" procedure ?
I just today realized that the "Manual Add" was hidden behind the
search procedure. We discussed this with Erik briefly and decided that
we would bring back an initial option of adding manually before doing
any searching.
fine.
The errors You get are presumably related to the fact that You are
searching with "no" criteria, i.e. just hitting Enter. Emilda does not
support this method.
never done so.
there is some manifest error regarding rpn in search.inc and requred's
from there.
please give instructions what to do / trace.
local database is ok and will serve yaz-client properly.
error also comes up on predefined search locations:
FULL ERRORS for search before add item :
YAZ error: 10010 (Invalid query) (Host: localhost:3000/emilda) (Query: )
YAZ error: 10010 (Invalid query) (Host: localhost:3000/emilda) (Query: )
YAZ error: 10010 (Invalid query) (Host: z3950.libris.kb.se:210/libr)
(Query: )
YAZ error: 10010 (Invalid query) (Host:
groucho.lib.rochester.edu:7090/voyager) (Query: )
YAZ error: 10010 (Invalid query) (Host:
zsrv.library.nwu.edu:11090/voyager) (Query: )
YAZ error: 10010 (Invalid query) (Host:
prodorbis.library.yale.edu:7090/voyager) (Query: )
YAZ error: 10010 (Invalid query) (Host:
catalog.princeton.edu:7090/voyager) (Query: )
YAZ error: 10010 (Invalid query) (Host:
catalog.library.cornell.edu:7090/voyager) (Query: )
YAZ error: 10010 (Invalid query) (Host: summit.syr.edu:7090/voyager)
(Query: )
YAZ error: 10010 (Invalid query) (Host: breeze.gmu.edu:7090/voyager)
(Query: )
YAZ error: 10010 (Invalid query) (Host: luis.indstate.edu:7090/voyager)
(Query: )
YAZ error: 10010 (Invalid query) (Host:
obiwan.lib.purdue.edu:7090/voyager) (Query: )
FULL ERRORS for delete item :
YAZ error: 10010 (Invalid query) (Host: ) (Query: )
--- /data/DIST/_ARCH/_BUILD/_cvs/emilda-doitlinux/cvs/src/perl/lib/MARC.pm
2004-09-25 09:04:38.000000000 +0200
+++ perl/lib/MARC.pm 2004-10-11 14:21:16.000000000 +0200
@@ -663,12 +663,31 @@
chdir($config{'zebra_path'});
# Initialize the session to the Zebra server
- my $zebra = IDZebra::Session->open( configFile =>
$config{'zebra_path'}.$config{'zebra_config'},
-
shadow => 1,
-
groupName => 'emilda',
-
) or die "Could not initialize Zebra session: $!";
+ warn('session-new');
+ my $zebra = IDZebra::Session->new( configFile =>
$config{'zebra_path'}.$config{'zebra_config'},
+ groupName => 'emilda',
+ ### useless ? - see below in open
+ databaseName =>
$config{'zebra_db'},
+ shadow => 1,
+ ) or die "Could not initialize Zebra session: $!";
+### func no more existant
+# $zebra->group(groupName => 'emilda',
+# ) or die "Could not set up Zebra session: $!";
+ warn('session-open');
+ $zebra->open(
+ ### useless !!! - log will show up : 'Database(s) selected: Default'
+ databaseName =>
$config{'zebra_db'},
+ ) or die "Could not open Zebra session: $!";
+
+ ### log will show up : 'Database(s) selected: $config{'zebra_db'}'
+ $zebra->databases($config{'zebra_db'},
+ ) or die "Could not set up Zebra search databases : $!";
+
# Begin transimission
$zebra->begin_trans;
# Update / Add the record
$zebra->update_record( file => $file,
+ groupName => 'emilda',
+ ### to be verified - might help or not : put it here for safety
+ databaseName => $config{'zebra_db'},
) or die "Could not update
record: ".$zebra->errString." / ".$!." (".$file.")";
# End transmission
|