static void Main(string[] args) { _corpus = Corpus.init(); //_corpus.Empty().Wait(); var crawler = new Crawler(_corpus); _querier = new Querier(_corpus); while (true) { var q = enterQuery(); Console.Clear(); Console.WriteLine("Entered: " + q); _querier.Query(q); Console.WriteLine("\nResults"); Console.WriteLine("Approx. " + _querier.duration + "ms"); foreach (var result in _querier.Results) { Console.WriteLine(); Console.WriteLine("[" + result.Extension + "] - " + result.Title + " - " + result.Size + " bytes"); Console.WriteLine("at .../" + result.RelativePath); Console.WriteLine(result.LastModified); Console.WriteLine(result.Value); Console.WriteLine(); } Console.Write("Enter a Key to Keep Searching.."); Console.ReadKey(); Console.Clear(); } }
public Form1() { InitializeComponent(); _corpus = Corpus.init(); var crawler = new Crawler(_corpus); _querier = new Querier(_corpus); _suggestMethod = new Func <string, CancellationTokenSource, HashSet <string> >(_querier.AutoCompleteWord); _queryMethod = new QueryDelegate(_querier.Query); }
public void CorpusTest() { corpus = Corpus.init(); corpus.Default().Wait(); }