From: miker Date: Sat, 16 Oct 2010 15:38:21 +0000 (+0000) Subject: go ahead and use the new index if we need to X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6d881c7acbd9ed69aed1341f0099000b6f6fa075;p=evergreen%2Fpines.git go ahead and use the new index if we need to git-svn-id: svn://svn.open-ils.org/ILS/trunk@18366 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index 5c6f1d02e0..de5bdf91d5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -305,7 +305,7 @@ sub cn_browse { }, { flesh => 1, flesh_fields => { acn => [qw/record owning_lib/] }, - order_by => { acn => "oils_text_as_bytea(label_sortkey) desc, upper(label) desc, id desc, owning_lib desc" }, + order_by => { acn => "oils_text_as_bytea(label_sortkey) desc, oils_text_as_bytea(upper(label)) desc, id desc, owning_lib desc" }, limit => $before_limit, offset => abs($page) * $page_size - $before_offset, } @@ -323,7 +323,7 @@ sub cn_browse { }, { flesh => 1, flesh_fields => { acn => [qw/record owning_lib/] }, - order_by => { acn => "oils_text_as_bytea(label_sortkey), upper(label), id, owning_lib" }, + order_by => { acn => "oils_text_as_bytea(label_sortkey), oils_text_as_bytea(upper(label)), id, owning_lib" }, limit => $after_limit, offset => abs($page) * $page_size - $after_offset, } @@ -428,7 +428,7 @@ sub cn_startwith { }, { flesh => 1, flesh_fields => { acn => [qw/record owning_lib/] }, - order_by => { acn => "oils_text_as_bytea(label_sortkey) desc, upper(label) desc, id desc, owning_lib desc" }, + order_by => { acn => "oils_text_as_bytea(label_sortkey) desc, oils_text_as_bytea(upper(label)) desc, id desc, owning_lib desc" }, limit => $limit, offset => $offset, } @@ -446,7 +446,7 @@ sub cn_startwith { }, { flesh => 1, flesh_fields => { acn => [qw/record owning_lib/] }, - order_by => { acn => "oils_text_as_bytea(label_sortkey), upper(label), id, owning_lib" }, + order_by => { acn => "oils_text_as_bytea(label_sortkey), oils_text_as_bytea(upper(label)), id, owning_lib" }, limit => $limit, offset => $offset, }