diff --git a/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java b/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java index 2dfc6868563..12e941200fa 100644 --- a/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java +++ b/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java @@ -516,7 +516,7 @@ public class DocIdEncodingBenchmark { public void encode(IndexOutput out, int start, int count, int[] docIds) throws IOException { int i; for (i = 0; i < count - 1; i += 2) { - long packedLong = ((long) docIds[i] << 32) & docIds[i + 1]; + long packedLong = (((long) docIds[i]) << 32) | docIds[i + 1]; out.writeLong(packedLong); } for (; i < count; i++) {