Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

javadoc: fix Terms.totalTermFreq desc

Yonik Seeleyc30b8d6cd867
diff --git a/lucene/src/java/org/apache/lucene/index/Terms.java b/lucene/src/java/org/apache/lucene/index/Terms.java
index 7694781b04b..67e1c144bf5 100644
--- a/lucene/src/java/org/apache/lucene/index/Terms.java
+++ b/lucene/src/java/org/apache/lucene/index/Terms.java
@@ -57,9 +57,12 @@ public abstract class Terms {
}
}
- /** Returns the number of documents containing the
- * specified term text. Returns 0 if the term does not
- * exist. */
+ /** Returns the total number of occurrences of this term
+ * across all documents (the sum of the freq() for each
+ * doc that has this term). This will be -1 if the
+ * codec doesn't support this measure. Note that, like
+ * other term measures, this measure does not take
+ * deleted documents into account. */
public long totalTermFreq(BytesRef text) throws IOException {
final TermsEnum termsEnum = getThreadTermsEnum();
if (termsEnum.seekExact(text, true)) {