From 6d881c7acbd9ed69aed1341f0099000b6f6fa075 Mon Sep 17 00:00:00 2001 From: miker Date: Sat, 16 Oct 2010 15:38:21 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index 5c6f1d02e..de5bdf91d 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, } -- 2.11.0