Skip to content

Apache Lucene open-source search software

LUCENE-5767: remove bogus cast (in this case can exceed Integer.MAX_VALUE, and the underlying delta reader takes long anyway)

Robert Muir7ab10178c380
diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
index d619e15f126..23757e0197b 100644
--- a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
+++ b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
@@ -484,7 +484,7 @@ public class MultiDocValues {
segmentToGlobalOrds[i] = new LongValues() {
@Override
public long get(long ord) {
- return ord + deltas.get((int) ord);
+ return ord + deltas.get(ord);
}
};
ramBytesUsed += deltas.ramBytesUsed();