[open-ils-commits] r17603 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Sep 11 10:18:27 EDT 2010
Author: miker
Date: 2010-09-11 10:18:24 -0400 (Sat, 11 Sep 2010)
New Revision: 17603
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
thinko in schwarzian transform, and provide a tiebreaker sort on string
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-09-11 03:31:26 UTC (rev 17602)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-09-11 14:18:24 UTC (rev 17603)
@@ -1325,7 +1325,7 @@
my $facets = {};
if ($limit) {
for my $f ( keys %$blob ) {
- my @sorted = map{ { $$_[1] => $$_[0] } } sort {$$b[0] <=> $$a[0]} map { [$_, $$blob{$f}{$_}] } keys %{ $$blob{$f} };
+ my @sorted = map{ { $$_[1] => $$_[0] } } sort {$$b[0] <=> $$a[0] || $$a[1] cmp $$b[1]} map { [$$blob{$f}{$_}, $_] } keys %{ $$blob{$f} };
@sorted = @sorted[0 .. $limit - 1] if (scalar(@sorted) > $limit);
for my $s ( @sorted ) {
my ($k) = keys(%$s);
More information about the open-ils-commits
mailing list