diff --git a/src/main/java/org/RI/P2/Indexer.java b/src/main/java/org/RI/P2/Indexer.java index 494f5c4..2259f43 100644 --- a/src/main/java/org/RI/P2/Indexer.java +++ b/src/main/java/org/RI/P2/Indexer.java @@ -66,10 +66,10 @@ public class Indexer { return arrayObject; } - void openIndex() throws IOException { + void createIndex() throws IOException { Directory dir = FSDirectory.open(Paths.get(folderPath)); IndexWriterConfig config = new IndexWriterConfig(customAnalyzer); - config.setOpenMode(OpenMode.CREATE_OR_APPEND); + config.setOpenMode(OpenMode.CREATE); index = new IndexWriter(dir, config); }