mirror of https://github.com/apache/lucene.git
Initialize the dictionary of sorted numeric DV with a known size
This commit is contained in:
parent
4f08f3dc6f
commit
d357bd1b34
|
@ -454,7 +454,7 @@ final class Lucene90DocValuesConsumer extends DocValuesConsumer {
|
||||||
for (long v : sortedUniqueValues) {
|
for (long v : sortedUniqueValues) {
|
||||||
meta.writeLong(v); // table[] entry
|
meta.writeLong(v); // table[] entry
|
||||||
}
|
}
|
||||||
encode = new LongIntHashMap();
|
encode = new LongIntHashMap(sortedUniqueValues.length);
|
||||||
for (int i = 0; i < sortedUniqueValues.length; ++i) {
|
for (int i = 0; i < sortedUniqueValues.length; ++i) {
|
||||||
encode.put(sortedUniqueValues[i], i);
|
encode.put(sortedUniqueValues[i], i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue