Use original alias when reconstructing the query, if set
authorMike Rylander <mrylander@gmail.com>
Mon, 3 Oct 2011 15:19:34 +0000 (11:19 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 28 Feb 2012 16:36:52 +0000 (11:36 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/extras/fts-replacement.pl
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm

index 0fca66b..516405f 100755 (executable)
@@ -54,7 +54,7 @@ sub abstract_query2str {
             $q .= join(" ", map { _abstract_query2str_modifier($_) } @{$abstract_query->{modifiers}}) if
                 exists $abstract_query->{modifiers};
         } elsif ($abstract_query->{type} eq 'node') {
-            $q .= " " . $abstract_query->{class};
+            $q .= " " . ( $abstract_query->{alias} || $abstract_query->{class} );
             $q .= "|$_" foreach @{$abstract_query->{fields}};
             $q .= ":";
         } elsif ($abstract_query->{type} eq 'atom') {
index c0e0203..8e3d5ef 100644 (file)
@@ -1085,7 +1085,7 @@ sub new_atom {
     return do{$pkg.'::atom'}->new( @_ );
 }
 
-sub requested_class { # also split into classname, fields, alias and alias modifier
+sub requested_class { # also split into classname, fields and alias
     my $self = shift;
     my $class = shift;