Ejemplo n.º 1
0
        public IEnumerable <LearningCourseDTO> IndexCourse(LearningCourseDTO course)
        {
            var indexer = new LuceneIndexer();

            indexer.AddUpdateLuceneIndex(course);
            return(indexer.GetAllIndexRecords());
        }
Ejemplo n.º 2
0
        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!");
        }