Subject: | ZOOM Error: Failure of title search based upon documentation. |
Date: | Fri, 14 Mar 2008 10:50:53 -0700 |
To: | bug-Net-Z3950-ZOOM@rt.cpan.org |
From: | John Watkins <jcw@odikia.com> |
irst the relevant background info:
Net-Z3950-ZOOM version 1.21
Yaz version 3.0.20
Mac OSX 10.4.11 on a 1.83 GHz Intel core Duo, MacBook Pro.
Appended below are three examples that were cobbled together using the documentation for the Zoom perl module. They are labeled Example 1, Example 2, and Example 3. These examples differ in only one line. The particular line is shown in a bold font in each example. The the search()/search_pdf() documentation is the source of the three examples of searches. [ In the example the word 'dinosaur' was used for the search. Given the database used here that produced zero results I substituted of 'mineral']
#######
Example 1 and Example 2 produced the following output:
>perl -w z3950_1.pl
00943n 2200157z 4504
245 $a UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS
710 $a UTAH GEOLOGICAL AND MINERAL SURVEY
520 $a Publications of the Utah Geological and Mineral Survey include reports of
investigation, special studies, bulletins, open-file reports, geologic map of
Utah, publications of geological societies, geologic and oil and mineral maps,
coal monographs, circulars, water resource bulletins, and reprints of articles.
513 $b -PRESENT
270 $p UTAH GEOLOGICAL AND MINERAL SURVEY $a INFORMATION SECTION, 606 BLACK HAWK WAY $b SALT LAKE CITY $d USA $k (801) 581-6831
037 $f UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS
506 $a NONE
540 $a OPERATIONAL
270 $p UTAH GEOLOGICAL AND MINERAL SURVEY $a INFORMATION SECTION, 606 BLACK HAWK WAY $b SALT LAKE CITY $d USA $k (801) 581-6831
035 $a ESDD0007
040 $a UTAH GEOLOGICAL AND MINERAL SURVEY
00900n 2200145z 4504
245 $a MINERAL OCCURRENCES, DEPOSITS, PROSPECTS, AND MINES
710 $a NEVADA BUREAU OF MINES AND GEOLOGY
520 $a Name, location, workings, geologic description, history of development and
mining (if any), analyses of rocks and minerals, and references are components
of this database.
513 $b 1970-PRESENT
270 $p NEVADA BUREAU OF MINES AND GEOLOGY $a NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA $b RENO $d USA $k (702) 784-6691
037 $f MINERAL OCCURRENCES, DEPOSITS, PROSPECTS, AND MINES
506 $a As an area is covered, the data is open-filed at the Nevada Bureau of Mines and
Geology.
270 $p JOE TINGLEY $p NEVADA BUREAU OF MINES AND GEOLOGY $a NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA $b RENO $d USA $k (702) 784-6691
035 $a ESDD0048
040 $a NEVADA BUREAU OF MINES AND GEOLOGY
########
Example 3, however produced a ZOOM error 107:
> perl -w z3950_1.pl
ZOOM error 107 "Query type not supported" from diag-set 'Bib-1'
This seems to be an error based upon the documentation. I presume the output should be s listing of titles with the word 'mineral' in them.
####### Example 1 ####################################
use ZOOM;
my $conn = new ZOOM::Connection("indexdata.dk:210/gils");
$conn->option(preferredRecordSyntax => "usmarc");
my $rs = $conn->search(new ZOOM::Query::PQF('@attr 1=4 mineral'));
my $n = $rs->size();
for $i (1 .. $n) {
my $rec = $rs->record($i-1);
print $rec->render();
}
if ($conn->errcode() != 0) {
die("somthing went wrong: " . $conn->errmsg() . "\n");
}
$conn->destroy();
####### Example 2 ####################################
use ZOOM;
my $conn = new ZOOM::Connection("indexdata.dk:210/gils");
$conn->option(preferredRecordSyntax => "usmarc");
my $rs = $conn->search_pqf('@attr 1=4 mineral');
my $n = $rs->size();
for $i (1 .. $n) {
my $rec = $rs->record($i-1);
print $rec->render();
}
if ($conn->errcode() != 0) {
die("somthing went wrong: " . $conn->errmsg() . "\n");
}
$conn->destroy();
####### Example 3 ####################################
use ZOOM;
my $conn = new ZOOM::Connection("indexdata.dk:210/gils");
$conn->option(preferredRecordSyntax => "usmarc");
my $rs = $conn->search(new ZOOM::Query::CQL('title=mineral'));
my $n = $rs->size();
for $i (1 .. $n) {
my $rec = $rs->record($i-1);
print $rec->render();
}
if ($conn->errcode() != 0) {
die("somthing went wrong: " . $conn->errmsg() . "\n");
}
$conn->destroy();