[open-ils-commits] r19965 - branches/rel_2_1/Open-ILS/web/opac/skin/default/js (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 4 13:26:55 EDT 2011


Author: gmc
Date: 2011-04-04 13:26:51 -0400 (Mon, 04 Apr 2011)
New Revision: 19965

Modified:
   branches/rel_2_1/Open-ILS/web/opac/skin/default/js/result_common.js
Log:
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).

Signed-off-by: Galen Charlton <gmc at esilibrary.com>

Modified: branches/rel_2_1/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/opac/skin/default/js/result_common.js	2011-04-04 17:26:31 UTC (rev 19964)
+++ branches/rel_2_1/Open-ILS/web/opac/skin/default/js/result_common.js	2011-04-04 17:26:51 UTC (rev 19965)
@@ -330,7 +330,7 @@
 		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 {



More information about the open-ils-commits mailing list