mirror of https://github.com/apache/lucene.git
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:
parent
8c0d234ffa
commit
52e9e3dac3
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue