[open-ils-commits] r16474 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri May 21 11:52:45 EDT 2010
Author: miker
Date: 2010-05-21 11:52:42 -0400 (Fri, 21 May 2010)
New Revision: 16474
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Log:
remove errant tsearch joiners if the normalizers are messy and leave leading/trailing spaces
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm 2010-05-21 15:46:30 UTC (rev 16473)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm 2010-05-21 15:52:42 UTC (rev 16474)
@@ -778,7 +778,7 @@
my $suffix_op = ":$suffix" if $suffix;
my $suffix_after = "|| '$suffix_op'" if $suffix;
- $sql = "to_tsquery('$classname', $prefix '(' || regexp_replace($sql,E'(?:\\\\s+|:)','$suffix_op&','g') $suffix_after || ')')";
+ $sql = "to_tsquery('$classname', $prefix '(' || btrim(regexp_replace($sql,E'(?:\\\\s+|:)','$suffix_op&','g'),'&|') $suffix_after || ')')";
return $self->sql($sql);
}
More information about the open-ils-commits
mailing list