Testing sorting result sets
This commit is contained in:
parent
71ed3a21f1
commit
0d99dcf149
|
|
@ -245,6 +245,7 @@ sub catalogsearch {
|
|||
}
|
||||
# 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 @@ sub catalogsearch {
|
|||
} 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 = ();
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ xpath enable
|
|||
|
||||
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 242 title,title:p
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue