mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7992 from jobec/3.x
Allow searching for things like serials, phone numbers, etc
This commit is contained in:
@@ -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
|
||||
))))
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user