@Override public void initialize(String directoryProviderName, Properties properties, BuildContext context) { // on "manual" indexing skip read-write check on index directory boolean manual = IndexingMode.MANUAL == context.getIndexingMode(); Path indexDir = DirectoryHelper.getVerifiedIndexPath( directoryProviderName, properties, !manual ); try { //this is cheap so it's not done in start() directory = DirectoryProviderHelper.createFSIndex( indexDir, properties, context.getServiceManager() ); } catch (IOException e) { throw new SearchException( "Unable to initialize index: " + directoryProviderName, e ); } }
@Override public void initialize(String directoryProviderName, Properties properties, BuildContext context) { // on "manual" indexing skip read-write check on index directory boolean manual = IndexingMode.MANUAL == context.getIndexingMode(); Path indexDir = DirectoryHelper.getVerifiedIndexPath( directoryProviderName, properties, !manual ); try { //this is cheap so it's not done in start() directory = DirectoryProviderHelper.createFSIndex( indexDir, properties, context.getServiceManager() ); } catch (IOException e) { throw new SearchException( "Unable to initialize index: " + directoryProviderName, e ); } }