public indexDatabaseStandalone(string IndexID)
        {
            pi = indexManager.PATH_PageIndex;
            di = indexManager.PATH_DomainIndex;

            pi = imbWEMManager.index.GetIndexFilepath(IndexID, true);
            di = imbWEMManager.index.GetIndexFilepath(IndexID, false);

            pageIndexTable   = new indexPageTable(pi, true);
            domainIndexTable = new indexDomainTable(di, true);
        }
示例#2
0
        /// <summary>
        /// Opens the index.
        /// </summary>
        /// <param name="IndexID">The index identifier.</param>
        /// <param name="sessionId">The session identifier.</param>
        /// <returns></returns>
        public indexPerformanceEntry OpenIndex(string IndexID, string sessionId = "*")
        {
            string pi = PATH_PageIndex;
            string di = PATH_DomainIndex;
            string es = PATH_ExperimentSessions;

            folder = new folderNode(PATH_MainFolder, "Global Index", "Folder for Global Index data");

            indexSessionRecords = new indexPerformanceRecord(folder.pathFor(PATH_IndexPerformance), doAutoLoad);

            if (sessionId == "*")
            {
                sessionId = experimentSessionRegistry.GENERAL_SESSIONID;
            }

            if (IndexID == "*" || IndexID == indexPerformanceEntry.GLOBAL_IndexRepository)
            {
            }
            else
            {
                folder = new folderNode(PATH_MainFolder.add(IndexID, "\\"), "Local Index", "Folder for Local Index (" + IndexID + ") data");

                pi = folder.pathFor(IndexID.getCleanFilePath() + "\\" + pi);
                di = folder.pathFor(IndexID.getCleanFilePath() + "\\" + di);
                es = folder.pathFor(IndexID.getCleanFilePath() + "\\" + es);
            }

            pageIndexTable   = new indexPageTable(folder.pathFor(pi), doAutoLoad);
            domainIndexTable = new indexDomainTable(folder.pathFor(di), doAutoLoad);

            if (imbWEMManager.settings.indexEngine.doRunIndexInReadOnlyMode)
            {
                pageIndexTable.ReadOnlyMode   = true;
                domainIndexTable.ReadOnlyMode = true;
            }
            experimentManager = new experimentSessionRegistry(sessionId, folder.pathFor(es), doAutoLoad);
            current_indexID   = IndexID;

            plugins           = new indexPlugInCollection(experimentEntry);
            plugins.IsEnabled = false;

            lastIndexSave = DateTime.Now;
            return(indexSessionEntry);
        }