/// <summary> /// Standardowy konstruktor /// </summary> /// <param name="workingDir">Katalog z danymi indeksu</param> public IxStdRISearchEngine(string workingDir) { workingDir = Misc.provideEndBackslash(workingDir); invIndex = new IxStdDiskRIIndex(workingDir + "invIndex", IxIndexMode.READ); documentsIndex = new IxStdDiskDocumentsIndex(workingDir + "documents", DocumentsIndexMode.READ); fwdDict = new IxFwdDistDiskDict(workingDir + "fwdDict", IxDictionaryMode.READ, null); tokenListing = new IxTokenizer(fwdDict); documentsCount = (double)invIndex.getDocumentsCount(); }
/// <summary> /// Standardowy konstruktor /// </summary> /// <param name="workingDir">Katalog z danymi indeksu</param> public IxHALIRSearchEngine(string workingDir) { workingDir = Misc.provideEndBackslash(workingDir); this.workingDir = workingDir; invIndex = new IxStdDiskRIIndex(workingDir + "invIndex", IxIndexMode.READ); fwdIndex = new IxStdDiskFwdIndex(workingDir + "fwdIndex", IxIndexMode.READ); documentsIndex = new IxStdDiskDocumentsIndex(workingDir + "documents", DocumentsIndexMode.READ); fwdDictionary = new IxFwdDistDiskDict(workingDir + "fwdDict", IxDictionaryMode.READ, null); bkdDictionary = new IxStdBkdDiskDict(workingDir + "bkdDict", IxDictionaryMode.READ); tokenListing = new IxTokenizer(fwdDictionary); halContextObtainer = new IxHalContextObtainer(workingDir + "hal", fwdIndex, invIndex); documentsCount = (double)invIndex.getDocumentsCount(); }