donnerpeter commented on a change in pull request #2351: URL: https://github.com/apache/lucene-solr/pull/2351#discussion_r574345109
########## File path: lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/SpellChecker.java ########## @@ -105,12 +106,9 @@ boolean checkWord(String word) { } Boolean checkSimpleWord(char[] wordChars, int length, WordCase originalCase) { - if (dictionary.isForbiddenWord(wordChars, length)) { - return false; - } - - if (findStem(wordChars, 0, length, originalCase, SIMPLE_WORD) != null) { - return true; + Root<CharsRef> entry = findStem(wordChars, 0, length, originalCase, SIMPLE_WORD); + if (entry != null) { + return !dictionary.hasFlag(entry.entryId, dictionary.forbiddenword); Review comment: this way we also check for affixed forbidden words ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org