Test case to show the problems of searching with three ISBNs user/ldw/query_parser_three_isbn_problem
authorLiam Whalen <whalen.ld@gmail.com>
Thu, 14 Nov 2013 01:41:43 +0000 (17:41 -0800)
committerLiam Whalen <whalen.ld@gmail.com>
Thu, 14 Nov 2013 01:47:45 +0000 (17:47 -0800)
Signed-off-by: Liam Whalen <whalen.ld@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm

index e4e237c..e46fe58 100644 (file)
@@ -1394,7 +1394,7 @@ sub tsquery {
 
     for my $atom (@{$self->query_atoms}) {
         if (ref($atom)) {
-            $self->{tsquery} .= "\n" . ${spc} x 3 . $atom->sql;
+            $self->{tsquery} .= "\n\n" . ${spc} x 3 . $atom->sql . "\n\n";
         } else {
             $self->{tsquery} .= $atom x 2;
         }
index 1aa5c76..6444175 100644 (file)
@@ -1202,7 +1202,7 @@ sub decompose {
 #                $class_node->add_phrase( $atom ) if ($atom =~ s/^$required_re//o);
 
                 $class_node->add_fts_atom( $atom, suffix => $truncate, prefix => $prefix, node => $class_node );
-                $struct->joiner( '&' );
+                $struct->joiner( '|' );
             }
 
             local $last_type = '';