Apache Lucene open-source search software
LUCENE-8676: The Korean tokenizer does not update the last position if the backtrace is caused by a big buffer (1024 chars).
jimczie9c02a6f71de
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex eea5bf70f75..9c2d63420f8 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -308,6 +308,9 @@ Bug fixes:was not propagating final position increments from its child streams correctly.(Dan Meehl, Alan Woodward)+* LUCENE-8676: The Korean tokenizer does not update the last position if the backtrace is caused+ by a big buffer (1024 chars). (Jim Ferenczi)+New Features* LUCENE-8026: ExitableDirectoryReader may now time out queries that run ondiff --git a/lucene/analysis/nori/src/java/org/apache/lucene/analysis/ko/KoreanTokenizer.java b/lucene/analysis/nori/src/java/org/apache/lucene/analysis/ko/KoreanTokenizer.javaindex 012352c8687..8875fd0e038 100644--- a/lucene/analysis/nori/src/java/org/apache/lucene/analysis/ko/KoreanTokenizer.java+++ b/lucene/analysis/nori/src/java/org/apache/lucene/analysis/ko/KoreanTokenizer.java@@ -535,7 +535,6 @@ public final class KoreanTokenizer extends Tokenizer {}if (pos > lastBackTracePos && posData.count == 1 && isFrontier) {- // if (pos > lastBackTracePos && posData.count == 1 && isFrontier) {// We are at a "frontier", and only one node is// alive, so whatever the eventual best path is must// come through this node. So we can safely commit@@ -618,6 +617,7 @@ public final class KoreanTokenizer extends Tokenizer {} else {// This means the backtrace only produced// punctuation tokens, so we must keep parsing.+ continue;}}