LUCENE-641: fix off-by-one bug for maximum field length

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@426883 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2006-07-30 11:56:57 +00:00
parent 8c0d234ffa
commit 52e9e3dac3
2 changed files with 4 additions and 1 deletions

View File

@ -86,6 +86,9 @@ Bug fixes
11. LUCENE-593: Fixed inner Iterator
(Kåre Fiedler Christiansen via Otis Gospodnetic)
12. LUCENE-641: fixed an off-by-one bug with IndexWriter.setMaxFieldLength()
(Daniel Naber)
Optimizations
1. LUCENE-586: TermDocs.skipTo() is now more efficient for multi-segment

View File

@ -171,7 +171,7 @@ final class DocumentWriter {
addPosition(fieldName, t.termText(), position++, null);
lastToken = t;
if (++length > maxFieldLength) {
if (++length >= maxFieldLength) {
if (infoStream != null)
infoStream.println("maxFieldLength " +maxFieldLength+ " reached, ignoring following tokens");
break;