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)); }