From 8b80ff9a4faa8a6994b1c308258f51e60fdd98bf Mon Sep 17 00:00:00 2001 From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Wed, 24 Mar 2010 19:24:54 +0000 Subject: [PATCH] support facet-only "search" Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm git-svn-id: svn://svn.open-ils.org/ILS/trunk@15957 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm | 6 ++++++ .../src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index 28bb23ba39..b5e8c0dc48 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -570,6 +570,12 @@ sub flatten { if (ref($node)) { if ($node->isa( 'QueryParser::query_plan::node' )) { + unless (@{$node->only_atoms}) { + push @rank_list, '1'; + $where .= 'TRUE'; + next; + } + my $table = $node->table; my $talias = $node->table_alias; 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 ccfdb9ee99..d8e0b0183f 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm @@ -2841,7 +2841,7 @@ sub query_parser_fts { # parse the query and supply any query-level %arg-based defaults # we expect, and make use of, query, superpage, superpage_size, debug and core_limit args - my $query = $parser->new( %args )->parse; + my $query = $parser->new( debug => 1, %args )->parse; # gather the site, if one is specified, defaulting to the in-query version my $ou = $args{org_unit}; -- 2.11.0