From 6edaf7bbe70066b819ce97812ac938b10d990dc4 Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 21 Feb 2006 00:08:41 +0000 Subject: [PATCH] get_record works now --- C4/Search.pm | 12 +++++++----- misc/zebra/unimarc/pqf.properties | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 8a13d1150f..ca6d5a4861 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -100,6 +100,7 @@ sub search { my $record = MARC::Record->new_from_xml($raw); my $line = MARCmarc2koha( $dbh, $record ); push @results, $line; +# push @results,$raw; $i++; } return ( \@results ); @@ -108,7 +109,7 @@ sub search { sub get_record { - # pass in an id (localnumber) and get back a MARC record + # pass in an id (biblionumber at this stage) and get back a MARC record my ($id) = @_; my $q; my $Zconn; @@ -120,12 +121,13 @@ sub get_record { $Zconn->option( cqlfile => C4::Context->config("intranetdir") . "/zebra/pqf.properties" ); $Zconn->option( preferredRecordSyntax => "xml" ); - my $string = "id=$id"; - warn $id; + my $string = "identifier=$id"; + warn $string; - # $q = new ZOOM::Query::CQL2RPN( $string, $Zconn); + $q = new ZOOM::Query::CQL2RPN( $string, $Zconn); eval { - my $rs = $Zconn->search_pqf("\@attr 1=12 $id"); +# my $rs = $Zconn->search_pqf("\@attr 1=12 $id"); + my $rs = $Zconn->search($q); my $n = $rs->size(); if ( $n > 0 ) { $raw = $rs->record(0)->raw(); diff --git a/misc/zebra/unimarc/pqf.properties b/misc/zebra/unimarc/pqf.properties index b68461c410..1ffd84af69 100644 --- a/misc/zebra/unimarc/pqf.properties +++ b/misc/zebra/unimarc/pqf.properties @@ -27,6 +27,7 @@ index.cql.serverChoice = 1=1016 index.rec.id = 1=12 +index.dc.identifier = 1=1007 index.dc.title = 1=4 index.dc.subject = 1=21 index.dc.creator = 1=1003 -- 2.39.5