public void RemoveRecords(IEnumerable <Guid> ids)
 {
     foreach (var id in ids)
     {
         LuceneSearch.ClearLuceneIndexRecord(id);
     }
 }
        public void UpdateIndex()
        {
            var challenges = challengesUnitOfWork.GetAll <Challenge>();

            var searchIndices = mapper.Map <List <ViewModels.SearchIndex> >(challenges);

            LuceneSearch.AddUpdateLuceneIndex(searchIndices);
        }
        public IEnumerable <string> GetTagsByTerm(string term, int limit)
        {
            var searchIndices = LuceneSearch.Search(Sort.RELEVANCE, new[] { "Tags" }, term, 0, limit);

            List <string> tags = new List <string>();

            foreach (var searchIndex in searchIndices)
            {
                tags.AddRange(searchIndex.Tags.Split(' '));
            }

            return(tags.Where(tag => tag.StartsWith(term) && !tag.Equals(string.Empty)));
        }
 public IEnumerable <ViewModels.SearchIndex> Search(Sort sort, string[] fieldNames, string input, int page, int limit)
 {
     return(LuceneSearch.Search(sort, fieldNames, input, page, limit));
 }
 public void Optimize()
 {
     LuceneSearch.Optimize();
 }