[open-ils-commits] [GIT] Evergreen ILS branch master updated. 79d40f168307d73497ef7d54a382c2cdd9816643

Evergreen Git git at git.evergreen-ils.org
Sat Jul 16 09:36:29 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  79d40f168307d73497ef7d54a382c2cdd9816643 (commit)
      from  24c16b3d1ff730c79a754cdfb6b8a4761c47f557 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 79d40f168307d73497ef7d54a382c2cdd9816643
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Thu Jul 7 17:18:16 2011 -0400

    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 at calvin.edu>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search.pm
index 6de6225..7a2851d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search.pm
@@ -88,6 +88,8 @@ sub spellcheck {
 		$logger->debug("spelling dictionary set to $dict");
 	}
 
+	$speller->set_option('ignore-case', 'true');
+
 	my @resp;
 
 	for my $word (split(/\s+/,$phrase) ) {

-----------------------------------------------------------------------

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Search.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list