public LuceneFileProcessor(string indexPath, bool create, DocumentFactory factory) { _is_started = false; _writer = null; _nb_indexed = 0; _index_path = indexPath; _create_index = create; _default_analyzer = null; _doc_factory = factory; }
public void DoBuildNewIndex() { string extensions, drives, dirs; if (_doc_factory == null) { _doc_factory = new DocumentFactory(); } //open new index LuceneFileProcessor lfp = new LuceneFileProcessor(Owl.Properties.Settings.Default.IndexPath, true, _doc_factory); GetParameters(out extensions, out drives, out dirs); extensions = _doc_factory.GetSupportedExtensions(); MetaFileEnumerator mfe = new MetaFileEnumerator(); MetaFileEnumerator.Params mfe_params = new MetaFileEnumerator.Params(drives, dirs, extensions, lfp); _crawling_status = new JobStatus("NewIndexBuilder"); mfe_params.jobStatus = _crawling_status; mfe_params.shouldCloseJobStatus = true; _crawling_thread = new Thread(new ParameterizedThreadStart(mfe.DoEnumerate)); _crawling_thread.Start(mfe_params); }
public LuceneFileUpdater(string indexPath, DocumentFactory docFactory, JobStatus jobStatus) { _index_path = indexPath; _doc_factory = docFactory; _job_status = jobStatus; }