ToString() public method

Prints a user-readable version of this query.
public ToString ( System field ) : System.String
field System
return System.String
コード例 #1
0
            public override Explanation Explain(AtomicReaderContext context, int doc)
            {
                Scorer cs     = GetScorer(context, (context.AtomicReader).LiveDocs);
                bool   exists = (cs != null && cs.Advance(doc) == doc);

                ComplexExplanation result = new ComplexExplanation();

                if (exists)
                {
                    result.Description = outerInstance.ToString() + ", product of:";
                    result.Value       = queryWeight;
                    result.Match       = true;
                    result.AddDetail(new Explanation(outerInstance.Boost, "boost"));
                    result.AddDetail(new Explanation(queryNorm, "queryNorm"));
                }
                else
                {
                    result.Description = outerInstance.ToString() + " doesn't match id " + doc;
                    result.Value       = 0;
                    result.Match       = false;
                }
                return(result);
            }