コード例 #1
0
ファイル: DocumentCrawler.cs プロジェクト: AnantLabs/owl-klb
 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;
 }
コード例 #2
0
ファイル: DocumentCrawler.cs プロジェクト: AnantLabs/owl-klb
        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);
        }
コード例 #3
0
ファイル: DocumentCrawler.cs プロジェクト: AnantLabs/owl-klb
 public LuceneFileUpdater(string indexPath, DocumentFactory docFactory, JobStatus jobStatus)
 {
     _index_path  = indexPath;
     _doc_factory = docFactory;
     _job_status  = jobStatus;
 }