public SearchCollectionResult SearchIndex(string QueryString, bool PreProcess) { Query Query = _IQueryParser.ProcessQuery(QueryString, PreProcess); _RankedSEDocuments.Clear(); SearchCollectionResult SearchCollectionResult = _ILuceneHelper.SearchCollection(Query); SearchCollectionResult.ProcessedQuery = Query.ToString(); _RankedSEDocuments.AddRange(SearchCollectionResult.RankedResults); return(SearchCollectionResult); }
private void SearchedCollection(IAsyncResult result) { if (this.InvokeRequired) { try { this.Invoke( new MethodInvoker( delegate() { SearchedCollection(result); })); } catch (Exception e) { } } else { SearchCollectionButton.Enabled = true; SaveSearchResultButton.Enabled = true; List <RankedSEDocument> RankedSEDocuments; try { SearchCollectionResult SearchCollectionResult = _SearchCollectionDelegate.EndInvoke(result); ProcessedQueryTextBox.Text = SearchCollectionResult.ProcessedQuery; SetListViewData(SearchCollectionResult.RankedResults); SetResultsStripStatusLabel(SearchCollectionResult.SearchEndDateTime, SearchCollectionResult.RankedResults.Count); } catch (Exception e) { //TODO: Show error } } }