donnerpeter commented on a change in pull request #2397: URL: https://github.com/apache/lucene-solr/pull/2397#discussion_r578345671
########## File path: lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Stemmer.java ########## @@ -247,19 +247,12 @@ boolean doStem( if (dictionary.hasFlag(entryId, dictionary.needaffix)) { continue; } - // we can't add this form, it only belongs inside a compound word - if (!context.isCompound() && dictionary.hasFlag(entryId, dictionary.onlyincompound)) { - continue; + if ((context == WordContext.COMPOUND_BEGIN || context == WordContext.COMPOUND_MIDDLE) Review comment: The "compoundforbid" check extracted (and the contexts enumerated), everything else went into an extracted method, since the same logic was needed in `applyAffix` ---------------------------------------------------------------- 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