private void search(String searchQuery) { // hits.totalHits a quantidade de arquivos achados this.searcher = new MineracaoProj1Business.Searcher(); TopDocs hits = this.searcher.Search(searchQuery); foreach (ScoreDoc scoreDoc in hits.ScoreDocs) { Document doc = this.searcher.GetDocument(scoreDoc); Console.WriteLine(doc.Get(Constants.FILE_PATH)); } }
static void Main(string[] args) { Indexer indexer = new Indexer("Normal"); if (System.Environment.MachineName.ToString().Equals("NINAHAACK")) indexer.IndexFiles(Constants.BASEPATHHAACK); else indexer.IndexFiles(Constants.BASEPATH); indexer.Close(); MineracaoProj1Business.Searcher searcher = new MineracaoProj1Business.Searcher("Normal"); TopDocs hits = searcher.Search(query1); Medidas med = new Medidas(hits, searcher, docs1); Console.WriteLine("Precisao = " + med.precisao); Console.WriteLine("Cobertura = " + med.cobetura); Console.WriteLine("FMeasure = " + med.fmeasure); }
private void _SearchAll(bool normal = false) { string dropdown = string.Empty; if (normal) dropdown = EProcessType.Normal.GetDescription(); else dropdown = this.dropdownlist.Text; this._searcher = new MineracaoProj1Business.Searcher(dropdown); }