[Koha-cvs] koha C4/SearchMarc.pm misc/zebra/usmarc/collect...

Chris Cormack chris at katipo.co.nz
Tue Mar 14 00:17:26 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	
Changes by:	Chris Cormack <rangi at savannah.gnu.org>	06/03/13 23:17:26

Modified files:
	C4             : SearchMarc.pm 
	misc/zebra/usmarc: collection.abs 

Log message:
	Testing sorting result sets

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/SearchMarc.pm.diff?tr1=1.61&tr2=1.62&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/misc/zebra/usmarc/collection.abs.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: koha/C4/SearchMarc.pm
diff -u koha/C4/SearchMarc.pm:1.61 koha/C4/SearchMarc.pm:1.62
--- koha/C4/SearchMarc.pm:1.61	Wed Mar  8 18:12:42 2006
+++ koha/C4/SearchMarc.pm	Mon Mar 13 23:17:26 2006
@@ -245,6 +245,7 @@
 		}
 # 		warn "$i : ".@$tags[$i]. "=> $tag / $subfield = ".$tagslib->{$tag}->{$subfield}->{kohafield};
 	}
+#        $query.= " ordered title";
 	warn "QUERY : $query";
 	my $Zconn = C4::Context->Zconn or die "unable to set Zconn";
 	my $q = new ZOOM::Query::CQL2RPN( $query, $Zconn);
@@ -255,6 +256,14 @@
 	} else {
 		warn "$numresults records found, retrieving them (max 80)\n";
 	}
+        # sort result set 
+        # in theory this should sort by title
+        if ($rs->sort("yaz", "1=4 <i") < 0) {
+                 warn "sort failed";
+        }
+        else {
+	    warn "sorted";
+	    }
 	my $result='';
 	my $scantimerstart=time();
 	my @finalresult = ();
Index: koha/misc/zebra/usmarc/collection.abs
diff -u koha/misc/zebra/usmarc/collection.abs:1.4 koha/misc/zebra/usmarc/collection.abs:1.5
--- koha/misc/zebra/usmarc/collection.abs:1.4	Tue Mar  7 20:32:27 2006
+++ koha/misc/zebra/usmarc/collection.abs	Mon Mar 13 23:17:26 2006
@@ -1,4 +1,4 @@
-# $Id: collection.abs,v 1.4 2006/03/07 20:32:27 rangi Exp $
+# $Id: collection.abs,v 1.5 2006/03/13 23:17:26 rangi Exp $
 
 # complete UNIMARC indexing rules for Bath level 0 and 1 service
 # (author, title, subject, keyword and exact services).
@@ -21,9 +21,9 @@
 
 all any
 
-melm 090$c      identifier-standard,identifier-standard:p
-melm 020$a				isbn:w
-melm 100                author,author:p
+melm 090$c		identifier-standard,identifier-standard:p
+melm 020$a		isbn:w,!:s
+melm 100                author,author:p,!:s
 melm 110                author
 melm 111                author
 melm 130                title
@@ -32,6 +32,7 @@
 melm 243                title,title:p
 melm 245$c              author
 melm 245                title,title:p
+melm 245/?/a            title           !:w,!:p,!:s
 melm 246                title,title:p
 melm 247                title,title:p
 melm 400$t              title,author





More information about the Koha-cvs mailing list