private void InitializeSearch() { if (this.Searcher == null) { this.Searcher = new LuceneSearcher(this.IndexDirectoryPath); } }
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(); }