use of org.apache.lucene.analysis.KeywordAnalyzer in project exhibitor by soabase.
the class IndexBuilder method open.
public void open() throws Exception {
if (!directory.exists() && !directory.mkdirs()) {
throw new IOException("Could not make: " + directory);
}
IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_35, new KeywordAnalyzer()).setOpenMode(IndexWriterConfig.OpenMode.CREATE);
niofsDirectory = new NIOFSDirectory(directory, new SingleInstanceLockFactory());
writer = new IndexWriter(niofsDirectory, conf);
}
Aggregations