diff options
| author | Yoshiki Shibukawa <yoshiki@shibu.jp> | 2014-01-22 02:12:04 -0800 |
|---|---|---|
| committer | Yoshiki Shibukawa <yoshiki@shibu.jp> | 2014-01-22 02:12:04 -0800 |
| commit | d8c8fa8240b0d4dd67702a5da388055d4429c393 (patch) | |
| tree | e202a140420722fcd215a2a248673a3dbcc21b77 /sphinx | |
| parent | 49238644401fa2728f171f5fa29c18f9150b96d5 (diff) | |
| download | sphinx-d8c8fa8240b0d4dd67702a5da388055d4429c393.tar.gz | |
Add development memo about stemming JS code, acceleration tips about stemming, small bug fix
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/search/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 14fe16dd..03a1f9df 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -89,7 +89,7 @@ var Stemmer = function() { Return true if the target word should be registered in the search index. This method is called after stemming. """ - return not (((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or + return 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()))) |
