diff --git a/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java b/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java index 788fa2933ac..500aff29d70 100644 --- a/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java +++ b/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java @@ -91,16 +91,35 @@ final class DefaultIndexingChain extends DocConsumer { // aborting on any exception from this method int maxDoc = state.segmentInfo.maxDoc(); + long t0 = System.nanoTime(); writeNorms(state); + if (docState.infoStream.isEnabled("IW")) { + docState.infoStream.message("IW", ((System.nanoTime()-t0)/1000000) + " msec to write norms"); + } + + t0 = System.nanoTime(); writeDocValues(state); + if (docState.infoStream.isEnabled("IW")) { + docState.infoStream.message("IW", ((System.nanoTime()-t0)/1000000) + " msec to write docValues"); + } + + t0 = System.nanoTime(); writePoints(state); + if (docState.infoStream.isEnabled("IW")) { + docState.infoStream.message("IW", ((System.nanoTime()-t0)/1000000) + " msec to write points"); + } // it's possible all docs hit non-aborting exceptions... + t0 = System.nanoTime(); initStoredFieldsWriter(); fillStoredFields(maxDoc); storedFieldsWriter.finish(state.fieldInfos, maxDoc); storedFieldsWriter.close(); + if (docState.infoStream.isEnabled("IW")) { + docState.infoStream.message("IW", ((System.nanoTime()-t0)/1000000) + " msec to finish stored fields"); + } + t0 = System.nanoTime(); Map fieldsToFlush = new HashMap<>(); for (int i=0;i