[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. b45c605197c31e2a515cb4382097953e72105179

Evergreen Git git at git.evergreen-ils.org
Wed Jun 12 22:13:37 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_4 has been updated
       via  b45c605197c31e2a515cb4382097953e72105179 (commit)
      from  2a7b63e42d4f186421bf80fc6e3b86661bc820e9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b45c605197c31e2a515cb4382097953e72105179
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Jun 11 16:44:35 2013 -0400

    Use the centralized initialization method for QP
    
    QueryParser maintains an effective singleton for internal configuration of
    the driver in order to avoid going to the database on every search request
    to gather configuration parameters.  There is also a centralized sub that
    has the task of properly configuring said singleton.  Previous to this commit
    we were not using that centralized initializer in one case, and that case
    happened to be the most important initialization of QP in all of Evergreen.
    The fallout from that was that some configuration was not being gathered
    and passed to QueryParser, resulting in incorrect search SQL being generated.
    
    This is rectified by using the centralized initializer everywhere that it
    is needed and can be used -- and particularly in the effected case.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
index 9709fa8..32d2cab 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
@@ -3202,46 +3202,7 @@ sub query_parser_fts_wrapper {
     my $parser = $OpenILS::Application::Storage::QParser;
     $parser->use;
 
-    if (!$parser->initialization_complete) {
-        my $cstore = OpenSRF::AppSession->create( 'open-ils.cstore' );
-        $parser->initialize(
-            config_record_attr_index_norm_map =>
-                $cstore->request(
-                    'open-ils.cstore.direct.config.record_attr_index_norm_map.search.atomic',
-                    { id => { "!=" => undef } },
-                    { flesh => 1, flesh_fields => { crainm => [qw/norm/] }, order_by => [{ class => "crainm", field => "pos" }] }
-                )->gather(1),
-            search_relevance_adjustment         =>
-                $cstore->request(
-                    'open-ils.cstore.direct.search.relevance_adjustment.search.atomic',
-                    { id => { "!=" => undef } }
-                )->gather(1),
-            config_metabib_field                =>
-                $cstore->request(
-                    'open-ils.cstore.direct.config.metabib_field.search.atomic',
-                    { id => { "!=" => undef } }
-                )->gather(1),
-            config_metabib_search_alias         =>
-                $cstore->request(
-                    'open-ils.cstore.direct.config.metabib_search_alias.search.atomic',
-                    { alias => { "!=" => undef } }
-                )->gather(1),
-            config_metabib_field_index_norm_map =>
-                $cstore->request(
-                    'open-ils.cstore.direct.config.metabib_field_index_norm_map.search.atomic',
-                    { id => { "!=" => undef } },
-                    { flesh => 1, flesh_fields => { cmfinm => [qw/norm/] }, order_by => [{ class => "cmfinm", field => "pos" }] }
-                )->gather(1),
-            config_record_attr_definition       =>
-                $cstore->request(
-                    'open-ils.cstore.direct.config.record_attr_definition.search.atomic',
-                    { name => { "!=" => undef } }
-                )->gather(1),
-        );
-
-        $cstore->disconnect;
-        die("Cannot initialize $parser!") unless ($parser->initialization_complete);
-    }
+    _initialize_parser($parser) unless $parser->initialization_complete;
 
 	if (! scalar( keys %{$args{searches}} )) {
 		die "No search arguments were passed to ".$self->api_name;

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/metabib.pm       |   41 +-------------------
 1 files changed, 1 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list