mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-12 08:25:01 -05:00
Fix #2581: The search doesn't work if language="es" (spanish)
This commit is contained in:
1 parent
2c351a1261
commit
9226513c8b
6 files changed
+3
-5
No files matched your search
@@ -68,6 +68,7 @@ Bugs fixed
|
||||
* #2576: ``sphinx.ext.imgmath`` crashes if subprocess raises error
|
||||
* #2577: ``sphinx.ext.imgmath``: Invalid argument are passed to dvisvgm
|
||||
* #2556: Xapian search does not work with Python 3
|
||||
* #2581: The search doesn't work if language="es" (spanish)
|
||||
|
||||
|
||||
Release 1.4.1 (released Apr 12, 2016)
|
||||
|
||||
@@ -362,7 +362,7 @@ class IndexBuilder(object):
|
||||
try:
|
||||
return self._stem_cache[word]
|
||||
except KeyError:
|
||||
self._stem_cache[word] = self.lang.stem(word)
|
||||
self._stem_cache[word] = self.lang.stem(word).lower()
|
||||
return self._stem_cache[word]
|
||||
_filter = self.lang.word_filter
|
||||
|
||||
|
||||
@@ -311,5 +311,4 @@ class SearchGerman(SearchLanguage):
|
||||
self.stemmer = snowballstemmer.stemmer('german')
|
||||
|
||||
def stem(self, word):
|
||||
word = word.lower()
|
||||
return self.stemmer.stemWord(word)
|
||||
@@ -237,7 +237,6 @@ class SearchEnglish(SearchLanguage):
|
||||
make at least the stem method nicer.
|
||||
"""
|
||||
def stem(self, word):
|
||||
word = word.lower()
|
||||
return PorterStemmer.stem(self, word, 0, len(word) - 1)
|
||||
|
||||
self.stemmer = Stemmer()
|
||||
|
||||
+1
-1
@@ -556,4 +556,4 @@ class SearchJapanese(SearchLanguage):
|
||||
return len(stemmed_word) > 1
|
||||
|
||||
def stem(self, word):
|
||||
return word.lower()
|
||||
return word
|
||||
@@ -256,7 +256,6 @@ class SearchChinese(SearchLanguage):
|
||||
make at least the stem method nicer.
|
||||
"""
|
||||
def stem(self, word):
|
||||
word = word.lower()
|
||||
return PorterStemmer.stem(self, word, 0, len(word) - 1)
|
||||
|
||||
self.stemmer = Stemmer()
|
||||
|
||||
Reference in new issue
Block a user