public string DeleteLink(int id) { LuceneSearcher searcher = new LuceneSearcher(new SearchQuery()); return !searcher.DocIsIndexed(id) ? string.Empty : string.Format("<a href='deletedocument.aspx?id={0}'>[delete]</a>", id); }
public string IndexLink(int id) { LuceneSearcher searcher = new LuceneSearcher(new SearchQuery()); return searcher.DocIsIndexed(id) ? string.Empty : string.Format("<a href='indexdocument.aspx?id={0}'>[index]</a>", id); }
private void DoSearch(SearchQuery query, int currentPage) { LuceneSearcher searcher = new LuceneSearcher(query); var docs = searcher.DoSearch(10, currentPage); pager.InnerHtml = searcher.Pager; lvSearchResults.DataSource = docs; lvSearchResults.DataBind(); }