From 76b7f60c25b6f0aa3ae756c3aeb17649e9a22f37 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 9 May 2005 21:26:23 +0000 Subject: [PATCH] handling limit and offset in the uncached version of the search, and not allowing caching of the unordered and staff searches git-svn-id: svn://svn.open-ils.org/ILS/trunk@683 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Storage/Publisher/metabib.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm index 3fd62c0341..1364e10443 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm @@ -145,6 +145,14 @@ sub search_class_fts { my $term = $args{term}; my $ou = $args{org_unit}; my $ou_type = $args{depth}; + my $limit = $args{limit}; + my $offset = $args{offset}; + + my $limit_clause = ''; + my $offset_clause = ''; + + $limit_clause = "LIMIT $limit" if (defined $limit and int($limit) > 0); + $offset_clause = "OFFSET $offset" if (defined $offset and int($offset) > 0); my $descendants = defined($ou_type) ? @@ -203,6 +211,7 @@ sub search_class_fts { GROUP BY 1 $visible_count_test $rank_order + $limit_clause $offset_clause SQL $log->debug("Field Search SQL :: [$select]",DEBUG); @@ -230,7 +239,6 @@ for my $class ( qw/title author subject keyword/ ) { api_level => 1, stream => 1, cdbi => "metabib::${class}_field_entry", - cachable => 1, ); __PACKAGE__->register_method( api_name => "open-ils.storage.metabib.$class.search_fts.metarecord.staff", @@ -246,7 +254,6 @@ for my $class ( qw/title author subject keyword/ ) { api_level => 1, stream => 1, cdbi => "metabib::${class}_field_entry", - cachable => 1, ); } -- 2.43.2