Fix token offsets.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@151040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2005-01-31 21:19:55 +00:00
parent 70e1848949
commit 59969d788a
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ public final class BrazilianStemFilter extends TokenFilter {
String s = stemmer.stem(token.termText()); String s = stemmer.stem(token.termText());
// If not stemmed, dont waste the time creating a new token. // If not stemmed, dont waste the time creating a new token.
if ((s != null) && !s.equals(token.termText())) { 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; return token;
} }