From: gmc Date: Mon, 4 Apr 2011 17:26:51 +0000 (+0000) Subject: tweak to default suggestion for low-hits search X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c5ab3c51f0f06c1019e7274caff48a93a694f3cc;p=evergreen%2Fequinox.git tweak to default suggestion for low-hits search Rather than show a suggestion for every word in the original search phrase, only display suggestions for words not found in the dictionary. For example, rather than having a search for "Amesh paradise" return a suggestion of "Amish paraders", return "Amish paradise" as the suggestion (assuming the default dictionaries are used). [Applying default skin change to KCLS skin] Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/opac/skin/kcls/js/result_common.js b/Open-ILS/web/opac/skin/kcls/js/result_common.js index bb82f20c81..4a3f9f694f 100644 --- a/Open-ILS/web/opac/skin/kcls/js/result_common.js +++ b/Open-ILS/web/opac/skin/kcls/js/result_common.js @@ -392,7 +392,7 @@ function resultSuggestSpelling(r) { if( blob ) blob = blob[0]; else continue; if( blob.word == word ) { - if( blob.suggestions && blob.suggestions[0] ) { + if( !blob.found && blob.suggestions && blob.suggestions[0] ) { newterm += " " + blob.suggestions[0]; unHideMe($('did_you_mean')); } else {