]> git.evergreen-ils.org Git - Evergreen.git/commit
Create a search_normalize() variant of naco_normalize()
authorDan Scott <dscott@laurentian.ca>
Thu, 10 Nov 2011 06:05:40 +0000 (01:05 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 14 Nov 2011 21:45:57 +0000 (16:45 -0500)
commit2bc4e97f72b39cc0093d3e295f97fcb4fa91106d
tree7180d3f834edd27e73e341bcba6fd75286fe1f90
parent77011103fbf99f1e1acf9266252ddf30d164d5ef
Create a search_normalize() variant of naco_normalize()

In the quest to support searching text that contains leading articles
joined by an apostrophe - for example, "l'histoire" - such that a
searcher can enter either "l'histoire" or "histoire" and get results -
add a variant of naco_normalize() that does not strip the apostrophe
entirely, but rather replaces it with a space such that the root word
can be indexed appropriately.

This implementation refactors the OpenILS::Utils::Normalize code to make
the differences between search_normalize() and naco_normalize() as clear
as possible, but duplicates code significantly in the in-db version of
the code. Someday maybe the database can rely on
OpenILS::Utils::Normalize instead of inline functions :)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/Normalize.pm
Open-ILS/src/perlmods/t/14-OpenILS-Utils.t
Open-ILS/src/sql/Pg/002.functions.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql