diff --git a/src/java/org/apache/lucene/search/TermQuery.java b/src/java/org/apache/lucene/search/TermQuery.java index 1c6d9479c24..cb63eb896ae 100644 --- a/src/java/org/apache/lucene/search/TermQuery.java +++ b/src/java/org/apache/lucene/search/TermQuery.java @@ -77,7 +77,8 @@ public class TermQuery extends Query { result.setDescription("weight("+getQuery()+" in "+doc+"), product of:"); Explanation idfExpl = - new Explanation(idf, "idf(docFreq=" + reader.docFreq(term) + ")"); + new Explanation(idf, "idf(docFreq=" + reader.docFreq(term) + + ", numDocs=" + reader.numDocs() + ")"); // explain query weight Explanation queryExpl = new Explanation();