diff --git a/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java b/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java index 76b2d6629f1..b953c211f14 100644 --- a/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java +++ b/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java @@ -484,7 +484,7 @@ class ReadersAndUpdates { success = true; } finally { if (!success) { - // Advance only the nextWriteDocValuesGen so that a 2nd + // Advance only the nextWriteFieldInfosGen so that a 2nd // attempt to write will write to a new file info.advanceNextWriteFieldInfosGen(); diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java index 6f0f74d3605..7cab5af77b6 100644 --- a/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java +++ b/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java @@ -189,8 +189,8 @@ public final class SegmentReader extends AtomicReader { DocValuesProducer dvp = segDocValues.getDocValuesProducer(gen, si, IOContext.READ, dir, dvFormat, infos); for (FieldInfo fi : infos) { dvProducersByField.put(fi.name, dvp); - dvProducers.add(dvp); } + dvProducers.add(dvp); } dvGens.addAll(genInfos.keySet());