}
File luceneIndexDir = context.getBundleContext().getDataFile("lucene-index");
boolean createNewIndex = luceneIndexDir.exists();
logger.info("Create new index: {}", !createNewIndex);
indexDefinitionManager = new IndexDefinitionManager(definitionGraph);
try {
graphIndexer = new GraphIndexer(definitionGraph, cgProvider.getContentGraph(),
FSDirectory.open(luceneIndexDir), !createNewIndex);
if(optimizePeriod != null && optimizePeriod >= 1) {
long period = optimizePeriod * 60000;