Skip to content

Commit f55f2af

Browse files
committed
SlowCompositeCodecWrapper: remove redundant FieldInfo lookup in its PointsReader.getValues method
1 parent 4f1b967 commit f55f2af

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lucene/core/src/java/org/apache/lucene/index/SlowCompositeCodecReaderWrapper.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,10 @@ private static class PointValuesSub {
565565

566566
private static class SlowCompositePointsReaderWrapper extends PointsReader {
567567

568-
private final CodecReader[] codecReaders;
569568
private final PointsReader[] readers;
570569
private final int[] docStarts;
571570

572571
SlowCompositePointsReaderWrapper(CodecReader[] codecReaders, int[] docStarts) {
573-
this.codecReaders = codecReaders;
574572
this.readers =
575573
Arrays.stream(codecReaders)
576574
.map(CodecReader::getPointsReader)
@@ -596,12 +594,9 @@ public void checkIntegrity() throws IOException {
596594
public PointValues getValues(String field) throws IOException {
597595
List<PointValuesSub> values = new ArrayList<>();
598596
for (int i = 0; i < readers.length; ++i) {
599-
FieldInfo fi = codecReaders[i].getFieldInfos().fieldInfo(field);
600-
if (fi != null && fi.getPointDimensionCount() > 0) {
597+
if (readers[i] != null) {
601598
PointValues v = readers[i].getValues(field);
602599
if (v != null) {
603-
// Apparently FieldInfo can claim a field has points, yet the returned
604-
// PointValues is null
605600
values.add(new PointValuesSub(v, docStarts[i]));
606601
}
607602
}

0 commit comments

Comments
 (0)