Lucene.Net.Search.TestBooleanMinShouldMatch.PrintHits C# (CSharp) Method

PrintHits() protected method

protected PrintHits ( string test, Lucene.Net.Search.ScoreDoc h, IndexSearcher searcher ) : void
test string
h Lucene.Net.Search.ScoreDoc
searcher IndexSearcher
return void
        protected internal virtual void PrintHits(string test, ScoreDoc[] h, IndexSearcher searcher)
        {
            Console.Error.WriteLine("------- " + test + " -------");

            NumberFormatInfo f = new NumberFormatInfo();
            f.NumberDecimalSeparator = ".";

            //DecimalFormat f = new DecimalFormat("0.000000", DecimalFormatSymbols.getInstance(Locale.ROOT));

            for (int i = 0; i < h.Length; i++)
            {
                Document d = searcher.Doc(h[i].Doc);
                decimal score = (decimal)h[i].Score;
                Console.Error.WriteLine("#" + i + ": " + score.ToString(f) + " - " + d.Get("id") + " - " + d.Get("data"));
            }
        }
    }