Beispiel #1
0
        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);
        }
Beispiel #2
0
        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
                }
            }
        }