Exemplo n.º 1
0
        List <Panel> panels = null; //store panels, for removing them later for the subsequent searching



        public form_Search(LuceneInteractive luceneApp, Form previousForm)
        {
            InitializeComponent();
            myLuceneApp = luceneApp;
            indexForm   = previousForm;

            panels = new List <Panel>();
        }
        private void btn_CreateIndex_Click(object sender, EventArgs e)
        {
            DateTime startIndex = System.DateTime.Now;

            // myLuceneApp = new LuceneInteractive(@"Z:\Desktop\QUT\IFN647\Project\collection_sample.json", @"Z:\Desktop\647_Searching_Engine_Index");
            myLuceneApp = new LuceneInteractive(jsonFilePath, indexPath);
            DateTime endIndex = System.DateTime.Now;

            string indexTime = "Index Time:" + (endIndex - startIndex);

            lbl_IndexTime.Text = indexTime;

            // form_Search searchForm = new form_Search(myLuceneApp);
            // Hide();
            // searchForm.Show();
        }
        //get baseline results, iterate every query in the collection
        public void GetBaselineResults()
        {
            myLuceneApp = new LuceneInteractive(jsonFilePath, indexPath);

            collection = Utils.getCollection(jsonFilePath); //retrieve all documents from Json file

            int itemNum = 0;

            foreach (Item item in collection)
            {
                itemNum++;
                if (itemNum > ITEM_NUM)
                {
                    break;
                }

                string query = item.query;
                myLuceneApp.SaveResultForSimulation(query, resultPath, item.query_id.ToString());
            }
        }
Exemplo n.º 4
0
 public Save(LuceneInteractive luceneApp, Form previousForm)
 {
     InitializeComponent();
     myLuceneApp = luceneApp;
     indexForm   = previousForm;
 }
 public form_Index()
 {
     InitializeComponent();
     myLuceneApp = null;
 }