mirror of https://github.com/apache/lucene.git
re-apply r1436460
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1436548 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f3736807bb
commit
337d1e6e6a
|
@ -37,7 +37,6 @@ import org.apache.lucene.util.fst.FST.INPUT_TYPE;
|
||||||
import org.apache.lucene.util.fst.PositiveIntOutputs;
|
import org.apache.lucene.util.fst.PositiveIntOutputs;
|
||||||
import org.apache.lucene.util.fst.Util;
|
import org.apache.lucene.util.fst.Util;
|
||||||
import org.apache.lucene.util.packed.PackedInts;
|
import org.apache.lucene.util.packed.PackedInts;
|
||||||
import org.apache.lucene.util.packed.PackedInts.FormatAndBits;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes numbers one of two ways:
|
* Writes numbers one of two ways:
|
||||||
|
@ -143,8 +142,7 @@ class Lucene42DocValuesConsumer extends DocValuesConsumer {
|
||||||
|
|
||||||
data.writeLong(minValue);
|
data.writeLong(minValue);
|
||||||
|
|
||||||
FormatAndBits formatAndBits = PackedInts.fastestFormatAndBits(count, bitsPerValue, PackedInts.COMPACT);
|
final PackedInts.Writer writer = PackedInts.getWriter(data, count, bitsPerValue, PackedInts.COMPACT);
|
||||||
final PackedInts.Writer writer = PackedInts.getWriter(data, count, formatAndBits.bitsPerValue, 0);
|
|
||||||
for(Number nv : values) {
|
for(Number nv : values) {
|
||||||
writer.add(nv.longValue() - minValue);
|
writer.add(nv.longValue() - minValue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue