diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java index 6f40b2ff056..fc3236d8240 100644 --- a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java +++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java @@ -234,7 +234,6 @@ public final class FieldInfo { assert checkConsistency(); } - // nocommit type is always number? should we remove this? void setNormValueType(DocValuesType type) { if (normType != null && normType != type) { throw new IllegalArgumentException("cannot change Norm type from " + normType + " to " + type + " for field \"" + name + "\""); diff --git a/lucene/core/src/java/org/apache/lucene/index/NormsConsumerPerField.java b/lucene/core/src/java/org/apache/lucene/index/NormsConsumerPerField.java index 178aedbf15c..4a3219eaa23 100644 --- a/lucene/core/src/java/org/apache/lucene/index/NormsConsumerPerField.java +++ b/lucene/core/src/java/org/apache/lucene/index/NormsConsumerPerField.java @@ -43,8 +43,6 @@ final class NormsConsumerPerField extends InvertedDocEndConsumerPerField impleme void finish() throws IOException { if (fieldInfo.isIndexed() && !fieldInfo.omitsNorms()) { if (consumer == null) { - // nocommit wrongish? what about the - // only-doc-with-norms-enabled-hits-exc case? fieldInfo.setNormValueType(FieldInfo.DocValuesType.NUMERIC); consumer = new NumericDocValuesWriter(fieldInfo, docState.docWriter.bytesUsed); } @@ -56,8 +54,8 @@ final class NormsConsumerPerField extends InvertedDocEndConsumerPerField impleme int docCount = state.segmentInfo.getDocCount(); if (consumer == null) { return; // null type - not omitted but not written - - // nocommit meaning the only docs that had - // norms hit exceptions? + // meaning the only docs that had + // norms hit exceptions (but indexed=true is set...) } consumer.finish(docCount); consumer.flush(state, normsWriter);