[Koha-cvs] koha C4/Search.pm misc/zebra/unimarc/pqf.proper...

Chris Cormack chris at katipo.co.nz
Tue Feb 21 01:08:41 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	
Changes by:	Chris Cormack <rangi at savannah.gnu.org>	06/02/21 00:08:41

Modified files:
	C4             : Search.pm 
	misc/zebra/unimarc: pqf.properties 

Log message:
	get_record works now

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Search.pm.diff?tr1=1.114&tr2=1.115&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/misc/zebra/unimarc/pqf.properties.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: koha/C4/Search.pm
diff -u koha/C4/Search.pm:1.114 koha/C4/Search.pm:1.115
--- koha/C4/Search.pm:1.114	Thu Feb 16 20:51:07 2006
+++ koha/C4/Search.pm	Tue Feb 21 00:08:41 2006
@@ -30,7 +30,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.114 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.115 $' =~ /\d+/g;
     shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
 };
 
@@ -100,6 +100,7 @@
         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 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 @@
     $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();
Index: koha/misc/zebra/unimarc/pqf.properties
diff -u koha/misc/zebra/unimarc/pqf.properties:1.1 koha/misc/zebra/unimarc/pqf.properties:1.2
--- koha/misc/zebra/unimarc/pqf.properties:1.1	Thu Feb  9 10:59:34 2006
+++ koha/misc/zebra/unimarc/pqf.properties	Tue Feb 21 00:08:41 2006
@@ -1,4 +1,4 @@
-# $Id: pqf.properties,v 1.1 2006/02/09 10:59:34 tipaul Exp $
+# $Id: pqf.properties,v 1.2 2006/02/21 00:08:41 rangi Exp $
 #
 # Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF()
 # back-end and the YAZ CQL-to-PQF converter.  This specifies the
@@ -27,6 +27,7 @@
 
 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





More information about the Koha-cvs mailing list