You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2011/06/05 16:34:12 UTC

svn commit: r1132421 - /lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/IntsImpl.java

Author: mikemccand
Date: Sun Jun  5 14:34:12 2011
New Revision: 1132421

URL: http://svn.apache.org/viewvc?rev=1132421&view=rev
Log:
fix ob1 that caused us to use 64 bits not 1 bit, per value

Modified:
    lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/IntsImpl.java

Modified: lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/IntsImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/IntsImpl.java?rev=1132421&r1=1132420&r2=1132421&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/IntsImpl.java (original)
+++ lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/IntsImpl.java Sun Jun  5 14:34:12 2011
@@ -111,7 +111,7 @@ class IntsImpl {
           minValue = maxValue = 0;
         }
         // if we exceed the range of positive longs we must switch to fixed ints
-        if ((maxValue - minValue) < (((long)1) << 63) && (maxValue - minValue) > 0) {
+        if ((maxValue - minValue) < (((long)1) << 63) && (maxValue - minValue) >= 0) {
           writePackedInts(docCount);
         } else {
           writeFixedInts(docCount);