lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1653593 - in /lucene/dev/branches/lucene_solr_4_10/lucene: core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
Date Wed, 21 Jan 2015 16:45:44 GMT
Author: mikemccand
Date: Wed Jan 21 16:45:43 2015
New Revision: 1653593

URL: http://svn.apache.org/r1653593
Log:
LUCENE-6192: don't overflow int when writing skip data for high freq terms in extremely large
indices

Modified:
    lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
    lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java?rev=1653593&r1=1653592&r2=1653593&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
Wed Jan 21 16:45:43 2015
@@ -135,8 +135,8 @@ public class Lucene40SkipListReader exte
       delta = skipStream.readVInt();
     }
 
-    freqPointer[level] += skipStream.readVInt();
-    proxPointer[level] += skipStream.readVInt();
+    freqPointer[level] += skipStream.readVLong();
+    proxPointer[level] += skipStream.readVLong();
     
     return delta;
   }

Modified: lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java?rev=1653593&r1=1653592&r2=1653593&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
Wed Jan 21 16:45:43 2015
@@ -141,8 +141,8 @@ public class Lucene40SkipListWriter exte
       skipBuffer.writeVInt(delta);
     }
 
-    skipBuffer.writeVInt((int) (curFreqPointer - lastSkipFreqPointer[level]));
-    skipBuffer.writeVInt((int) (curProxPointer - lastSkipProxPointer[level]));
+    skipBuffer.writeVLong(curFreqPointer - lastSkipFreqPointer[level]);
+    skipBuffer.writeVLong(curProxPointer - lastSkipProxPointer[level]);
 
     lastSkipDoc[level] = curDoc;
     



Mime
View raw message