]> git.evergreen-ils.org Git - Evergreen.git/commit
Make spell-checking case insensitive
authorDan Wells <dbw2@calvin.edu>
Thu, 7 Jul 2011 21:18:16 +0000 (17:18 -0400)
committerMike Rylander <mrylander@gmail.com>
Sat, 16 Jul 2011 13:29:18 +0000 (09:29 -0400)
commit79d40f168307d73497ef7d54a382c2cdd9816643
tree3369a0595dedcac48b26f8734e820cee25a87ab8
parent24c16b3d1ff730c79a754cdfb6b8a4761c47f557
Make spell-checking case insensitive

As it stands, if you search for a proper noun using
lower case, but manage to trigger the "did you mean"
functionality, all the words are 'corrected' even if
just the case is wrong.  However, we are stripping
out the best correction precisely because it is the
same word, different case.  It is a bit confusing to
explain, but here is an example:

daniel potatoe

gets corrected to:

Daniela potato

This happens because the current spell check is case
sensitive, so 'daniel' is spelled wrong, but then we
remove 'Daniel' from the list of corrections
(presumably to avoid possibly suggesting terms which
would yield the same exact result set).

So, we either need to make the spell-check itself case
insensitive, or stop removing the re-cased corrections.
Since the catalog search itself is already
case-insensitive, I think it makes sense that the spell
check should follow suit.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search.pm