Apache Lucene open-source search software
LUCENE-3728: remove nocommit
Robert Muirdae9070d1f0c
diff --git a/lucene/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/src/java/org/apache/lucene/index/IndexWriter.javaindex 25efb9eb557..52c483b849d 100644--- a/lucene/src/java/org/apache/lucene/index/IndexWriter.java+++ b/lucene/src/java/org/apache/lucene/index/IndexWriter.java@@ -2555,10 +2555,12 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {newDsName = segName;}- // nocommit: remove thisSet<String> codecDocStoreFiles = new HashSet<String>();- codec.storedFieldsFormat().files(info, codecDocStoreFiles);- codec.termVectorsFormat().files(info, codecDocStoreFiles);+ if (info.getDocStoreOffset() != -1) {+ // only violate the codec this way if its preflex+ codec.storedFieldsFormat().files(info, codecDocStoreFiles);+ codec.termVectorsFormat().files(info, codecDocStoreFiles);+ }// Copy the segment filesfor (String file: info.files()) {