Fixed bug where docs larger than maxDocBytesToAnalyze would cause last fragment to be sized as remainder of doc (which could be huge).

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@168452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Harwood 2005-05-05 22:40:45 +00:00
parent a20246c68c
commit 12a91b4395
1 changed files with 2 additions and 2 deletions

View File

@ -251,8 +251,8 @@ public class Highlighter
} }
// append text after end of last token // append text after end of last token
if (lastEndOffset < text.length()) // if (lastEndOffset < text.length())
newText.append(encoder.encodeText(text.substring(lastEndOffset))); // newText.append(encoder.encodeText(text.substring(lastEndOffset)));
currentFrag.textEndPos = newText.length(); currentFrag.textEndPos = newText.length();