Fix #2581: The search doesn't work if language="es" (spanish)

This commit is contained in:
Takeshi KOMIYA committed 2016-05-26 20:59:29 +09:00
1 parent 2c351a1261
commit 9226513c8b
6 files changed
+3 -5

No files matched your search

+1
View File
@@ -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)
+1 -1
View File
@@ -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
-1
View File
@@ -311,5 +311,4 @@ class SearchGerman(SearchLanguage):
self.stemmer = snowballstemmer.stemmer('german')
def stem(self, word):
word = word.lower()
return self.stemmer.stemWord(word)
-1
View File
@@ -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
View File
@@ -556,4 +556,4 @@ class SearchJapanese(SearchLanguage):
return len(stemmed_word) > 1
def stem(self, word):
return word.lower()
return word
-1
View File
@@ -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()