searchtools.js_t: don't stem words if it cuts them to less than 3 characters #1529

This commit is contained in:
Timotheus Kampik 2016-06-05 15:56:50 +02:00
parent 475ebf6c36
commit e23a099cba

View File

@ -159,6 +159,10 @@ var Search = {
} }
// stem the word // stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase()); var word = stemmer.stemWord(tmp[i].toLowerCase());
// prevent stemmer from cutting word smaller than two chars
if(word.length < 3 && tmp[i].length >= 3) {
word = tmp[i];
}
var toAppend; var toAppend;
// select the correct list // select the correct list
if (word[0] == '-') { if (word[0] == '-') {