Beispiel #1
0
 private void InitializeSearch()
 {
     if (this.Searcher == null)
     {
         this.Searcher = new LuceneSearcher(this.IndexDirectoryPath);
     }
 }
Beispiel #2
0
        public void IndexFiles(string [] filePaths)
        {
            if (this.Searcher != null)
            {
                this.Searcher.Close();
                this.Searcher = null;
            }

            LuceneIndexer indexer = new LuceneIndexer(this.IndexDirectoryPath, this.CreateIndex);
            this.CreateIndex = false;

            foreach (string filePath in filePaths)
            {
                indexer.IndexFile(filePath);
            }

            indexer.Close();
        }