private void BindTermDocs(Term term) { if (CurrentIndex.IsIndexBeOpend()) { IOpen open = CurrentIndex.GetCurrentOpendIndex(); TermDocumentsRelation tdr = new TermDocumentsRelation(open); docs = tdr.DocumentCount(term); label6.Text = string.Format("文档数:{0}", docs.Count); } }
public void UpdateUI() { if (CurrentIndex.IsIndexBeOpend()) { IndexOpen open = CurrentIndex.GetCurrentOpendIndex(); docNum = open.Reader.MaxDoc(); label1.Text = string.Format("共有文档{0}条", docNum); FieldTermsRelation rela = FieldTermsRelation.getInstance(); for (int i = 0; i < rela.Fields.Length; i++) { comboBox1.Items.Add(rela.Fields[i]); } if (comboBox1.Items.Count > 0) { comboBox1.SelectedIndex = 0; } } }
public void UpdateUI() { if (CurrentIndex.IsIndexBeOpend()) { IndexOpen open = CurrentIndex.GetCurrentOpendIndex(); GeneralBind bind = new GeneralBind(open); GeneralBind.ViewData data = bind.Execute(); IndexPath_Lab.Text += data.IndexPath; FieldNum_Ctl.Text += data.FieldNum; DocumentNum_Ctl.Text += data.DocumentNum; IndexOP_Ctl.Text += data.IsOptimized ? "已经优化" : "没有优化"; IndexVer_Ctl.Text += data.Version.ToString(); UpdateTime_Ctl.Text += data.UpdateTime.ToString(); listBox1.Items.Clear(); FieldTermsRelation rela = FieldTermsRelation.getInstance(); for (int i = 0; i < rela.Fields.Length; i++) { listBox1.Items.Add(rela.Fields[i]); } listBox1.Items.Insert(0, "所有Fields"); listBox1.SelectedIndex = 0; } }