Apache Lucene open-source search software
fix nasty bug (doesnt affect any codecs today): respect bytesref offset
Robert Muir1b671cfba3a2
diff --git a/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java b/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.javaindex ceb38ff4dac..48a7709bed0 100644--- a/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java+++ b/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java@@ -321,7 +321,7 @@ public final class FuzzyTermsEnum extends TermsEnum {// TODO: benchmark doing this backwardsfor (int i = 1; i < matchers.length; i++)- if (matchers[i].run(term.bytes, 0, term.length)) {+ if (matchers[i].run(term.bytes, term.offset, term.length)) {// this sucks, we convert just to score based on length.if (codePointCount == -1) {codePointCount = UnicodeUtil.codePointCount(term);