Skip to content

Commit 00f2b01

Browse files
authored
Bump block size of postings to 256. (#15160)
With recent changes that vectorized query evaluation, Lucene could further improve CPU efficiency by bumping the block size. This reduces the likelihood of skipping blocks of postings in exchange for better CPU efficiency when processing blocks of postings. So in theory this helps the harder queries (the ones that can't skip much) and may hurt a bit the easier queries. The optimization for prefix sums that computes the sum on partially decoded data is less applicable since the introduction of the bitset encoding and with 2x bigger blocks, so it has been removed: delta-coded blocks get fully decoded before their prefix sum is computed.
1 parent 8f3e49b commit 00f2b01

File tree

77 files changed

+5493
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+5493
-342
lines changed

build-tools/build-infra/src/main/groovy/lucene.regenerate.forUtil.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ void addGenerateFromPythonTask(Project project, File genDir, String taskName, St
4747

4848
configure(project(":lucene:core")) {
4949
addGenerateFromPythonTask(project,
50-
file("src/java/org/apache/lucene/codecs/lucene103"), "ForUtil", "gen_ForUtil.py", "ForUtil.java")
51-
addGenerateFromPythonTask(project,
52-
file("src/java/org/apache/lucene/codecs/lucene103"), "ForDeltaUtil", "gen_ForDeltaUtil.py", "ForDeltaUtil.java")
50+
file("src/java/org/apache/lucene/codecs/lucene104"), "ForUtil", "gen_ForUtil.py", "ForUtil.java")
5351
}
5452

5553
configure(project(":lucene:backward-codecs")) {
@@ -71,4 +69,9 @@ configure(project(":lucene:backward-codecs")) {
7169
file("src/java/org/apache/lucene/backward_codecs/lucene101"), "ForUtil101", "gen_ForUtil.py", "ForUtil.java")
7270
addGenerateFromPythonTask(project,
7371
file("src/java/org/apache/lucene/backward_codecs/lucene101"), "ForDeltaUtil101", "gen_ForDeltaUtil.py", "ForDeltaUtil.java")
72+
73+
addGenerateFromPythonTask(project,
74+
file("src/java/org/apache/lucene/backward_codecs/lucene103"), "ForUtil103", "gen_ForUtil.py", "ForUtil.java")
75+
addGenerateFromPythonTask(project,
76+
file("src/java/org/apache/lucene/backward_codecs/lucene103"), "ForDeltaUtil103", "gen_ForDeltaUtil.py", "ForDeltaUtil.java")
7477
}

lucene/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ Optimizations
136136
* GITHUB#15151: Use `SimScorer#score` bulk API to compute impact scores per
137137
block of postings. (Adrien Grand)
138138

139+
* GITHUB#15160: Increased the size used for blocks of postings from 128 to 256.
140+
This gives a noticeable speedup to many queries. (Adrien Grand)
141+
139142
Bug Fixes
140143
---------------------
141144
* GITHUB#14161: PointInSetQuery's constructor now throws IllegalArgumentException
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/ForDeltaUtil.java": "4cd0564cb34801443d050065ab7ae8d93e2dca92",
3+
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/gen_ForDeltaUtil.py": "8d656f27945b5a679babc41ac47afbd351359aa8"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/ForUtil.java": "10904a43be9537b6c52ec13a1139c71c11345c97",
3+
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/gen_ForUtil.py": "61a6c7d73b0e8b166ebf7344fc24e95873240e9f"
4+
}

lucene/backward-codecs/src/java/module-info.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
exports org.apache.lucene.backward_codecs.lucene912;
4141
exports org.apache.lucene.backward_codecs.lucene100;
4242
exports org.apache.lucene.backward_codecs.lucene101;
43+
exports org.apache.lucene.backward_codecs.lucene103;
4344
exports org.apache.lucene.backward_codecs.packed;
4445
exports org.apache.lucene.backward_codecs.store;
4546

@@ -51,7 +52,8 @@
5152
org.apache.lucene.backward_codecs.lucene90.Lucene90PostingsFormat,
5253
org.apache.lucene.backward_codecs.lucene99.Lucene99PostingsFormat,
5354
org.apache.lucene.backward_codecs.lucene912.Lucene912PostingsFormat,
54-
org.apache.lucene.backward_codecs.lucene101.Lucene101PostingsFormat;
55+
org.apache.lucene.backward_codecs.lucene101.Lucene101PostingsFormat,
56+
org.apache.lucene.backward_codecs.lucene103.Lucene103PostingsFormat;
5557
provides org.apache.lucene.codecs.KnnVectorsFormat with
5658
org.apache.lucene.backward_codecs.lucene90.Lucene90HnswVectorsFormat,
5759
org.apache.lucene.backward_codecs.lucene91.Lucene91HnswVectorsFormat,
@@ -71,5 +73,6 @@
7173
org.apache.lucene.backward_codecs.lucene99.Lucene99Codec,
7274
org.apache.lucene.backward_codecs.lucene912.Lucene912Codec,
7375
org.apache.lucene.backward_codecs.lucene100.Lucene100Codec,
74-
org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
76+
org.apache.lucene.backward_codecs.lucene101.Lucene101Codec,
77+
org.apache.lucene.backward_codecs.lucene103.Lucene103Codec;
7578
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.lucene.backward_codecs.lucene103;
18+
19+
import java.util.Objects;
20+
import org.apache.lucene.util.FixedBitSet;
21+
22+
class BitSetUtil {
23+
24+
/**
25+
* Converts set bits in the given bitset to an array of document IDs. Only processes bits from
26+
* index {@code from} (inclusive) to {@code to} (exclusive) and returns the number of bits set in
27+
* this range.
28+
*
29+
* <p>Each set bit's position is converted to a document ID by adding the {@code base} value and
30+
* stored in the provided {@code array}.
31+
*
32+
* <p>NOTE: Caller need to ensure the {@code array} has a length greater than or equal to {@code
33+
* bitSet.cardinality(from, to) + 1}.
34+
*/
35+
static int denseBitsetToArray(FixedBitSet bitSet, int from, int to, int base, int[] array) {
36+
assert bitSet.cardinality(from, to) + 1 <= array.length
37+
: "Array length must be at least bitSet.cardinality(from, to) + 1";
38+
39+
Objects.checkFromToIndex(from, to, bitSet.length());
40+
41+
int offset = 0;
42+
long[] bits = bitSet.getBits();
43+
// First, align `from` with a word start, ie. a multiple of Long.SIZE (64)
44+
if ((from & 0x3F) != 0) {
45+
long word = bits[from >> 6] >>> from;
46+
int numBitsTilNextWord = -from & 0x3F;
47+
if (to - from < numBitsTilNextWord) {
48+
// All bits are in a single word
49+
word &= (1L << (to - from)) - 1L;
50+
return word2Array(word, from + base, array, offset);
51+
}
52+
offset = word2Array(word, from + base, array, offset);
53+
from += numBitsTilNextWord;
54+
assert (from & 0x3F) == 0;
55+
}
56+
57+
for (int i = from >> 6, end = to >> 6; i < end; ++i) {
58+
long word = bits[i];
59+
offset = word2Array(word, base + (i << 6), array, offset);
60+
}
61+
62+
// Now handle remaining bits in the last partial word
63+
if ((to & 0x3F) != 0) {
64+
long word = bits[to >> 6] & ((1L << to) - 1);
65+
offset = word2Array(word, base + (to & ~0x3F), array, offset);
66+
}
67+
68+
return offset;
69+
}
70+
71+
private static int word2Array(long word, int base, int[] docs, int offset) {
72+
final int bitCount = Long.bitCount(word);
73+
74+
if (bitCount >= 32) {
75+
return denseWord2Array(word, base, docs, offset);
76+
}
77+
78+
for (int i = 0; i < bitCount; i++) {
79+
int ntz = Long.numberOfTrailingZeros(word);
80+
docs[offset++] = base + ntz;
81+
word ^= 1L << ntz;
82+
}
83+
84+
return offset;
85+
}
86+
87+
private static int denseWord2Array(long word, int base, int[] docs, int offset) {
88+
final int lWord = (int) word;
89+
final int hWord = (int) (word >>> 32);
90+
final int offset32 = offset + Integer.bitCount(lWord);
91+
int hOffset = offset32;
92+
93+
for (int i = 0; i < 32; i++) {
94+
docs[offset] = base + i;
95+
docs[hOffset] = base + i + 32;
96+
offset += (lWord >>> i) & 1;
97+
hOffset += (hWord >>> i) & 1;
98+
}
99+
100+
docs[offset32] = base + 32 + Integer.numberOfTrailingZeros(hWord);
101+
102+
return hOffset;
103+
}
104+
}

lucene/core/src/java/org/apache/lucene/codecs/lucene103/ForDeltaUtil.java renamed to lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/ForDeltaUtil.java

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,46 +16,45 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.apache.lucene.codecs.lucene103;
19+
package org.apache.lucene.backward_codecs.lucene103;
2020

21-
import static org.apache.lucene.codecs.lucene103.ForUtil.BLOCK_SIZE;
22-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_1;
23-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_2;
24-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_4;
25-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_5;
26-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_6;
27-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_7;
28-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK16_8;
29-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_1;
30-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_10;
31-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_11;
32-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_12;
33-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_13;
34-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_14;
35-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_15;
36-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_16;
37-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_2;
38-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_3;
39-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_4;
40-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_5;
41-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_6;
42-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_7;
43-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_8;
44-
import static org.apache.lucene.codecs.lucene103.ForUtil.MASK32_9;
45-
import static org.apache.lucene.codecs.lucene103.ForUtil.collapse16;
46-
import static org.apache.lucene.codecs.lucene103.ForUtil.collapse8;
47-
import static org.apache.lucene.codecs.lucene103.ForUtil.decode1;
48-
import static org.apache.lucene.codecs.lucene103.ForUtil.decode10;
49-
import static org.apache.lucene.codecs.lucene103.ForUtil.decode2;
50-
import static org.apache.lucene.codecs.lucene103.ForUtil.decode3;
51-
import static org.apache.lucene.codecs.lucene103.ForUtil.decode9;
52-
import static org.apache.lucene.codecs.lucene103.ForUtil.decodeSlow;
53-
import static org.apache.lucene.codecs.lucene103.ForUtil.encode;
54-
import static org.apache.lucene.codecs.lucene103.ForUtil.expand16;
55-
import static org.apache.lucene.codecs.lucene103.ForUtil.expand8;
21+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.BLOCK_SIZE;
22+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_1;
23+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_2;
24+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_4;
25+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_5;
26+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_6;
27+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_7;
28+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK16_8;
29+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_1;
30+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_10;
31+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_11;
32+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_12;
33+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_13;
34+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_14;
35+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_15;
36+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_16;
37+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_2;
38+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_3;
39+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_4;
40+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_5;
41+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_6;
42+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_7;
43+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_8;
44+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.MASK32_9;
45+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.collapse16;
46+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.collapse8;
47+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.decode1;
48+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.decode10;
49+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.decode2;
50+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.decode3;
51+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.decode9;
52+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.decodeSlow;
53+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.encode;
54+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.expand16;
55+
import static org.apache.lucene.backward_codecs.lucene103.ForUtil.expand8;
5656

5757
import java.io.IOException;
58-
import org.apache.lucene.internal.vectorization.PostingDecodingUtil;
5958
import org.apache.lucene.store.DataOutput;
6059
import org.apache.lucene.util.packed.PackedInts;
6160

lucene/core/src/java/org/apache/lucene/codecs/lucene103/ForUtil.java renamed to lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/ForUtil.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.apache.lucene.codecs.lucene103;
19+
package org.apache.lucene.backward_codecs.lucene103;
2020

2121
import java.io.IOException;
22-
import org.apache.lucene.internal.vectorization.PostingDecodingUtil;
2322
import org.apache.lucene.store.DataOutput;
2423

2524
/**
@@ -29,7 +28,9 @@
2928
*/
3029
public final class ForUtil {
3130

31+
/** Number of integers per block. */
3232
public static final int BLOCK_SIZE = 128;
33+
3334
static final int BLOCK_SIZE_LOG2 = 7;
3435

3536
static int expandMask16(int mask16) {

lucene/core/src/java/org/apache/lucene/codecs/lucene103/Lucene103Codec.java renamed to lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/Lucene103Codec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.lucene.codecs.lucene103;
17+
package org.apache.lucene.backward_codecs.lucene103;
1818

1919
import java.util.Objects;
2020
import org.apache.lucene.codecs.Codec;
@@ -49,7 +49,7 @@
4949
*
5050
* <p>If you want to reuse functionality of this codec in another codec, extend {@link FilterCodec}.
5151
*
52-
* @see org.apache.lucene.codecs.lucene103 package documentation for file format details.
52+
* @see org.apache.lucene.backward_codecs.lucene103 package documentation for file format details.
5353
* @lucene.experimental
5454
*/
5555
public class Lucene103Codec extends Codec {

lucene/core/src/java/org/apache/lucene/codecs/lucene103/Lucene103PostingsFormat.java renamed to lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene103/Lucene103PostingsFormat.java

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.lucene.codecs.lucene103;
17+
package org.apache.lucene.backward_codecs.lucene103;
1818

1919
import java.io.IOException;
2020
import org.apache.lucene.codecs.BlockTermState;
@@ -26,7 +26,6 @@
2626
import org.apache.lucene.codecs.PostingsWriterBase;
2727
import org.apache.lucene.codecs.lucene103.blocktree.Lucene103BlockTreeTermsReader;
2828
import org.apache.lucene.codecs.lucene103.blocktree.Lucene103BlockTreeTermsWriter;
29-
import org.apache.lucene.index.ImpactsEnum;
3029
import org.apache.lucene.index.IndexOptions;
3130
import org.apache.lucene.index.SegmentReadState;
3231
import org.apache.lucene.index.SegmentWriteState;
@@ -319,7 +318,7 @@
319318
*
320319
* @lucene.experimental
321320
*/
322-
public final class Lucene103PostingsFormat extends PostingsFormat {
321+
public class Lucene103PostingsFormat extends PostingsFormat {
323322

324323
/** Filename extension for some small metadata about how postings are encoded. */
325324
public static final String META_EXTENSION = "psm";
@@ -342,25 +341,15 @@ public final class Lucene103PostingsFormat extends PostingsFormat {
342341
/** Size of blocks. */
343342
public static final int BLOCK_SIZE = ForUtil.BLOCK_SIZE;
344343

345-
public static final int BLOCK_MASK = BLOCK_SIZE - 1;
344+
static final int BLOCK_MASK = BLOCK_SIZE - 1;
346345

347346
/** We insert skip data on every block and every SKIP_FACTOR=32 blocks. */
348347
public static final int LEVEL1_FACTOR = 32;
349348

350349
/** Total number of docs covered by level 1 skip data: 32 * 128 = 4,096 */
351350
public static final int LEVEL1_NUM_DOCS = LEVEL1_FACTOR * BLOCK_SIZE;
352351

353-
public static final int LEVEL1_MASK = LEVEL1_NUM_DOCS - 1;
354-
355-
/**
356-
* Return the class that implements {@link ImpactsEnum} in this {@link PostingsFormat}. This is
357-
* internally used to help the JVM make good inlining decisions.
358-
*
359-
* @lucene.internal
360-
*/
361-
public static Class<? extends ImpactsEnum> getImpactsEnumImpl() {
362-
return Lucene103PostingsReader.BlockPostingsEnum.class;
363-
}
352+
static final int LEVEL1_MASK = LEVEL1_NUM_DOCS - 1;
364353

365354
static final String TERMS_CODEC = "Lucene103PostingsWriterTerms";
366355
static final String META_CODEC = "Lucene103PostingsWriterMeta";
@@ -372,10 +361,6 @@ public static Class<? extends ImpactsEnum> getImpactsEnumImpl() {
372361

373362
static final int VERSION_CURRENT = VERSION_START;
374363

375-
private final int version;
376-
private final int minTermBlockSize;
377-
private final int maxTermBlockSize;
378-
379364
/** Creates {@code Lucene103PostingsFormat} with default settings. */
380365
public Lucene103PostingsFormat() {
381366
this(
@@ -391,31 +376,13 @@ public Lucene103PostingsFormat() {
391376
* Lucene103BlockTreeTermsWriter#Lucene103BlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
392377
*/
393378
public Lucene103PostingsFormat(int minTermBlockSize, int maxTermBlockSize) {
394-
this(minTermBlockSize, maxTermBlockSize, VERSION_CURRENT);
395-
}
396-
397-
/** Expert constructor that allows setting the version. */
398-
public Lucene103PostingsFormat(int minTermBlockSize, int maxTermBlockSize, int version) {
399379
super("Lucene103");
400-
if (version < VERSION_START || version > VERSION_CURRENT) {
401-
throw new IllegalArgumentException("Version out of range: " + version);
402-
}
403-
this.version = version;
404-
Lucene103BlockTreeTermsWriter.validateSettings(minTermBlockSize, maxTermBlockSize);
405-
this.minTermBlockSize = minTermBlockSize;
406-
this.maxTermBlockSize = maxTermBlockSize;
407380
}
408381

409382
@Override
410383
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException {
411-
PostingsWriterBase postingsWriter = new Lucene103PostingsWriter(state, version);
412-
try {
413-
return new Lucene103BlockTreeTermsWriter(
414-
state, postingsWriter, minTermBlockSize, maxTermBlockSize);
415-
} catch (Throwable t) {
416-
IOUtils.closeWhileSuppressingExceptions(t, postingsWriter);
417-
throw t;
418-
}
384+
throw new UnsupportedOperationException(
385+
"This postings format may not be used for writing, use the current postings format");
419386
}
420387

421388
@Override

0 commit comments

Comments
 (0)