private void button3_Click(object sender, EventArgs e) { var crt = new IndexByLucene(DTable); crt.InitIndex(DTable); var dt = new DataTable(); dt.Columns.Add("ID Query"); dt.Columns.Add("NameFile"); dt.Columns.Add("Score"); var i = 1; lstFindSearch = new List <Tuple <string, string> >(); foreach (var query in DQuery) { var db = crt.Search(query); foreach (DataRow row in db.Rows) { dt.Rows.Add(i.ToString(), row[0], row[1]); lstFindSearch.Add(new Tuple <string, string>(i.ToString(), row[0].ToString())); } i++; } var rstForm = new FormLucene(dt, lstFindSearch); rstForm.Show(); //var crt = new CreateIndex(dTable); //crt.InitIndex(dTable); //var rstForm = new ResultForm(dt: crt.Search(txtQuery.Text, 1)); //rstForm.Show(); }
private void Search_Click_1(object sender, EventArgs e) { var crt = new IndexByLucene(DTable); crt.InitIndex(DTable); var rstForm = new FormLucene(crt.Search(txtQuery.Text.ToString()), lstFindSearch); rstForm.Show(); }