ResourceManager resourceManager = createResourceManager(indexFactory);
DefaultLuceneIndexTemplate template = new DefaultLuceneIndexTemplate();
template.setIndexFactory(indexFactory);
template.setAnalyzer(new SimpleAnalyzer());
template.afterPropertiesSet();
DefaultResourceManagementDefinition definition = new DefaultResourceManagementDefinition();
definition.setIndexWriterOpen(true);
definition.setWriteOperationsForIndexWriterAuthorized(true);
//definition.setIndexReaderOpen(true);