Merge pull request #7992 from jobec/3.x

Allow searching for things like serials, phone numbers, etc
This commit is contained in:
Takeshi KOMIYA
2020-07-26 12:25:59 +09:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ var Stemmer = function() {
len(word) == 0 or not (
((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or
(ord(word[0]) < 256 and (
len(word) < 3 or word in self.stopwords or word.isdigit()
len(word) < 3 or word in self.stopwords
))))

View File

@@ -166,8 +166,7 @@ var Search = {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] === "") {
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
// skip this "word"
continue;
}