[open-ils-commits] r9954 - in
trunk/Open-ILS/src/perlmods/OpenILS/Application: . Storage
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jul 1 21:42:01 EDT 2008
Author: miker
Date: 2008-07-01 21:42:00 -0400 (Tue, 01 Jul 2008)
New Revision: 9954
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm
Log:
treat full birth/death dates specially, as tsearch2 is inconsistent between 8.1 and 8.2
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2008-07-02 01:34:39 UTC (rev 9953)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2008-07-02 01:42:00 UTC (rev 9954)
@@ -695,6 +695,9 @@
$string .= $value->textContent . " ";
}
}
+
+ $string =~ s/(\d{4})-(\d{4})/$1 $2/sgo;
+
return NFD($string);
}
@@ -900,6 +903,7 @@
$val =~ s/\pM+//sgo;
$val =~ s/\pC+//sgo;
$val =~ s/\W+$//sgo;
+ $val =~ s/(\d{4})-(\d{4})/$1 $2/sgo;
$ns->value( lc($val) );
push @ns_list, $ns;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm 2008-07-02 01:34:39 UTC (rev 9953)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm 2008-07-02 01:42:00 UTC (rev 9954)
@@ -106,6 +106,7 @@
$term =~ s/(^|\s+)-(\w+)/$1!$2/go;
$term =~ s/\b(\+)(\w+)/$2/go;
$term =~ s/^\s*\b(.+)\b\s*$/$1/o;
+ $term =~ s/(\d{4})-(\d{4})/$1 $2/go;
#$term =~ s/^(?:an?|the)\b(.*)/$1/o;
$log->debug("Stripped search term string is [$term]",DEBUG);
More information about the open-ils-commits
mailing list