You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/15 19:51:21 UTC

[GitHub] [lucene-solr] donnerpeter commented on a change in pull request #2375: LUCENE-9775: Hunspell: make FORCEUCASE work when the first compound w…

donnerpeter commented on a change in pull request #2375:
URL: https://github.com/apache/lucene-solr/pull/2375#discussion_r576396291



##########
File path: lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/CheckCompoundPattern.java
##########
@@ -94,7 +94,7 @@ private boolean hasAllFlags(Root<?> root, char[] flags) {
   CharsRef expandReplacement(CharsRef word, int breakPos) {
     if (replacement != null && charsMatch(word, breakPos, replacement)) {
       return new CharsRef(
-          word.subSequence(0, breakPos)
+          new String(word.chars, 0, word.offset + breakPos)

Review comment:
       Include all compounds parts from the very beginning for the case check to work later




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org