[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. c3327de4c99c19e98266a026457b3c07cfe7febe
Evergreen Git
git at git.evergreen-ils.org
Wed May 28 13:11:01 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, master has been updated
via c3327de4c99c19e98266a026457b3c07cfe7febe (commit)
from e3e264ad948df150906def7591cf306b899dd871 (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 c3327de4c99c19e98266a026457b3c07cfe7febe
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