BIG speedup in oISBN
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 24 Jun 2006 00:45:34 +0000 (00:45 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 24 Jun 2006 00:45:34 +0000 (00:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4772 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm

index 29e60d4..59b439e 100644 (file)
@@ -921,7 +921,7 @@ sub oISBN {
        # Find the record that has that ISBN.
        my $bibrec = $_storage->request(
                'open-ils.cstore.direct.metabib.full_rec.search.atomic',
-               { tag => '020', subfield => 'a', value => { ilike => $isbn.'%'} }
+               { tag => '020', subfield => 'a', value => { like => lc($isbn).'%'} }
        )->gather(1);
 
        # Go away if we don't have one.
@@ -944,10 +944,12 @@ sub oISBN {
        my @rec_list = sort keys %unique_recs;
 
        # And now fetch the ISBNs for thos records.
-       my $recs = $_storage->request(
-               'open-ils.cstore.direct.metabib.full_rec.search.atomic',
-               { tag => '020', subfield => 'a', record => \@rec_list }
-       )->gather(1);
+       my $recs = [];
+       push @$recs,
+               $_storage->request(
+                       'open-ils.cstore.direct.metabib.full_rec.search',
+                       { tag => '020', subfield => 'a', record => $_ }
+               )->gather(1) for (@rec_list);
 
        # We're done with the storage server session.
        $_storage->disconnect;