Skip to content

Apache Lucene open-source search software

set compound format, regardless of create flag

Erik Hatcher6dfd88a6594c
diff --git a/sandbox/contributions/ant/src/main/org/apache/lucene/ant/IndexTask.java b/sandbox/contributions/ant/src/main/org/apache/lucene/ant/IndexTask.java
index d1d5f4d5329..21bd812c811 100644
--- a/sandbox/contributions/ant/src/main/org/apache/lucene/ant/IndexTask.java
+++ b/sandbox/contributions/ant/src/main/org/apache/lucene/ant/IndexTask.java
@@ -245,9 +245,7 @@ public class IndexTask extends Task {
IndexWriter writer =
new IndexWriter(indexDir, analyzer, create);
- if (create && useCompoundIndex) {
- writer.setUseCompoundFile(useCompoundIndex);
- }
+ writer.setUseCompoundFile(useCompoundIndex);
int totalFiles = 0;
int totalIndexed = 0;
int totalIgnored = 0;
@@ -292,6 +290,7 @@ public class IndexTask extends Task {
if (indexModified != null) {
if (DateField.stringToTime(indexModified)
== file.lastModified()) {
+ // TODO: remove existing document
indexIt = false;
}
}