From 59969d788a7c755cbbf07884acdb50cd148cad0b Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Mon, 31 Jan 2005 21:19:55 +0000 Subject: [PATCH] Fix token offsets. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@151040 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/analysis/br/BrazilianStemFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/br/BrazilianStemFilter.java b/sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/br/BrazilianStemFilter.java index 468a0e30ac6..e6aac340a42 100644 --- a/sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/br/BrazilianStemFilter.java +++ b/sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/br/BrazilianStemFilter.java @@ -117,7 +117,7 @@ public final class BrazilianStemFilter extends TokenFilter { String s = stemmer.stem(token.termText()); // If not stemmed, dont waste the time creating a new token. if ((s != null) && !s.equals(token.termText())) { - return new Token(s, 0, s.length(), token.type()); + return new Token(s, token.startOffset(), token.endOffset(), token.type()); } return token; }