Github user jpountz commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/451#discussion_r218199848
--- Diff: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java ---
@@ -52,10 +53,17 @@
/** Caller must pre-seek the provided {@link IndexInput} to the index
location that {@link BKDWriter#finish} returned */
public BKDReader(IndexInput in) throws IOException {
version = CodecUtil.checkHeader(in, BKDWriter.CODEC_NAME,
BKDWriter.VERSION_START, BKDWriter.VERSION_CURRENT);
- numDims = in.readVInt();
+ int packedDims = in.readVInt();
+ if (version >= BKDWriter.VERSION_LEAF_STORES_BOUNDS) {
+ numDataDims = packedDims & 0x0000FFFF;
+ numIndexDims = packedDims >>> 16;
--- End diff --
let's read two vints instead?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]