public IEnumerable <LearningCourseDTO> IndexCourse(LearningCourseDTO course) { var indexer = new LuceneIndexer(); indexer.AddUpdateLuceneIndex(course); return(indexer.GetAllIndexRecords()); }
public void Execute(IJobExecutionContext context) { LuceneIndexer.ClearLuceneIndex(); Console.WriteLine("Search index was cleared successfully!"); var items = FeedParser.GetModels(); LuceneIndexer.AddUpdateLuceneIndex(items); Console.WriteLine("Search index was created successfully!"); LuceneIndexer.Optimize(); Console.WriteLine("Search index was optimized successfully!"); }