indexDir = FSDirectory.open(dir);
if (!dir.isDirectory()) {
// load the skos model from the given file
FileManager fileManager = new FileManager();
fileManager.addLocatorFile();
fileManager.addLocatorURL();
fileManager.addLocatorClassLoader(SKOSEngineImpl.class.getClassLoader());
if (getExtension(filenameOrURI).equals("zip")) {
fileManager.addLocatorZip(filenameOrURI);
filenameOrURI = getBaseName(filenameOrURI);
}
skosModel = fileManager.loadModel(filenameOrURI);
entailSKOSModel();
indexSKOSModel();
}
searcher = new IndexSearcher(DirectoryReader.open(indexDir));