[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_6 updated. b60043b42f74530e5f6c6f62c4f84aa37f4f3191
Evergreen Git
git at git.evergreen-ils.org
Wed May 28 13:11:35 EDT 2014
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_6 has been updated
via b60043b42f74530e5f6c6f62c4f84aa37f4f3191 (commit)
from 035e757e30904ddb191ec46b3554cb323fed987c (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 b60043b42f74530e5f6c6f62c4f84aa37f4f3191
Author: Mike Rylander <mrylander at gmail.com>
Date: Wed May 14 11:54:47 2014 -0400
LP#1310751: Reorder query-building wrapper for QueryParser
In order to make sure that the transparent boolean pushdown does
not cause filters and modifiers to end up deeply embedded in the
query tree, we put them at the front.
This is a short-term fix. Long-term, we need to make use of the
floating subquery syntax ( {{ ... }} ) available in QueryParser,
which is designed to address the semantic separation between what
the user types into the search box, and the various UI widgets that
can add query clauses.
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
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 625f5ab..e71fd35 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
@@ -3242,32 +3242,29 @@ sub query_parser_fts_wrapper {
my $base_plan = $parser->new( query => $base_query )->parse;
- $query = "$query preferred_language($args{preferred_language})"
+ $query = "preferred_language($args{preferred_language}) $query"
if ($args{preferred_language} and !$base_plan->parse_tree->find_filter('preferred_language'));
- $query = "$query preferred_language_weight($args{preferred_language_weight})"
+ $query = "preferred_language_weight($args{preferred_language_weight}) $query"
if ($args{preferred_language_weight} and !$base_plan->parse_tree->find_filter('preferred_language_weight') and !$base_plan->parse_tree->find_filter('preferred_language_multiplier'));
- # we add these to the end of the query (last-wins) because in wrapper mode we want to retain the behaviour
- # of separately specified options taking precidenc -- IOW, the user should not be able to cause a change in,
- # say, superpage size by adjusting the query string.
- $query = "$query estimation_strategy($args{estimation_strategy})" if ($args{estimation_strategy});
- $query = "$query site($args{org_unit})" if ($args{org_unit});
- $query = "$query depth($args{depth})" if (defined($args{depth}));
- $query = "$query sort($args{sort})" if ($args{sort});
- $query = "$query limit($args{limit})" if ($args{limit});
- $query = "$query core_limit($args{core_limit})" if ($args{core_limit});
- $query = "$query skip_check($args{skip_check})" if ($args{skip_check});
- $query = "$query superpage($args{superpage})" if ($args{superpage});
- $query = "$query offset($args{offset})" if ($args{offset});
- $query = "$query #metarecord" if ($self->api_name =~ /metabib/);
- $query = "$query #available" if ($args{available});
- $query = "$query #descending" if ($args{sort_dir} && $args{sort_dir} =~ /^d/i);
- $query = "$query #staff" if ($self->api_name =~ /staff/);
- $query = "$query before($args{before})" if (defined($args{before}) and $args{before} =~ /^\d+$/);
- $query = "$query after($args{after})" if (defined($args{after}) and $args{after} =~ /^\d+$/);
- $query = "$query during($args{during})" if (defined($args{during}) and $args{during} =~ /^\d+$/);
- $query = "$query between($args{between}[0],$args{between}[1])"
+ $query = "estimation_strategy($args{estimation_strategy}) $query" if ($args{estimation_strategy});
+ $query = "site($args{org_unit}) $query" if ($args{org_unit});
+ $query = "depth($args{depth}) $query" if (defined($args{depth}));
+ $query = "sort($args{sort}) $query" if ($args{sort});
+ $query = "limit($args{limit}) $query" if ($args{limit});
+ $query = "core_limit($args{core_limit}) $query" if ($args{core_limit});
+ $query = "skip_check($args{skip_check}) $query" if ($args{skip_check});
+ $query = "superpage($args{superpage}) $query" if ($args{superpage});
+ $query = "offset($args{offset}) $query" if ($args{offset});
+ $query = "#metarecord $query" if ($self->api_name =~ /metabib/);
+ $query = "#available $query" if ($args{available});
+ $query = "#descending $query" if ($args{sort_dir} && $args{sort_dir} =~ /^d/i);
+ $query = "#staff $query" if ($self->api_name =~ /staff/);
+ $query = "before($args{before}) $query" if (defined($args{before}) and $args{before} =~ /^\d+$/);
+ $query = "after($args{after}) $query" if (defined($args{after}) and $args{after} =~ /^\d+$/);
+ $query = "during($args{during}) $query" if (defined($args{during}) and $args{during} =~ /^\d+$/);
+ $query = "between($args{between}[0],$args{between}[1]) $query"
if ( ref($args{between}) and @{$args{between}} == 2 and $args{between}[0] =~ /^\d+$/ and $args{between}[1] =~ /^\d+$/ );
-----------------------------------------------------------------------
Summary of changes:
.../Application/Storage/Publisher/metabib.pm | 41 +++++++++----------
1 files changed, 19 insertions(+), 22 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list