lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r426883 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/DocumentWriter.java
Date Sun, 30 Jul 2006 11:56:58 GMT
Author: dnaber
Date: Sun Jul 30 04:56:57 2006
New Revision: 426883

URL: http://svn.apache.org/viewvc?rev=426883&view=rev
Log:
LUCENE-641: fix off-by-one bug for maximum field length

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/index/DocumentWriter.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=426883&r1=426882&r2=426883&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sun Jul 30 04:56:57 2006
@@ -86,6 +86,9 @@
 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

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/DocumentWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/DocumentWriter.java?rev=426883&r1=426882&r2=426883&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/DocumentWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/DocumentWriter.java Sun Jul 30 04:56:57
2006
@@ -171,7 +171,7 @@
                 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;



Mime
View raw message