Skip to content

Commit 5f03152

Browse files
committed
fixup! Only stem words once
1 parent 607ea49 commit 5f03152

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sphinx/search/zh.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,8 @@ def stem(self, word: str) -> str:
255255
# avoids some issues with acronyms
256256
stemmed = self.stemmer.stemWord(word.lower())
257257
should_not_be_stemmed = (
258-
word in self.latin_terms
259-
and len(word) >= 3
260-
and len(stemmed) < 3
261-
)
258+
word in self.latin_terms and len(word) >= 3 > len(stemmed)
259+
) # fmt: skip
262260
if should_not_be_stemmed:
263261
return word.lower()
264262
return stemmed

0 commit comments

Comments
 (0)