Skip to content

Apache Lucene open-source search software

Javadoc correction as suggested by Bug#32353

Christoph Gollerb674ad711fe1
diff --git a/src/java/org/apache/lucene/search/FilteredTermEnum.java b/src/java/org/apache/lucene/search/FilteredTermEnum.java
index b6953a03b8d..b6f37164cd1 100644
--- a/src/java/org/apache/lucene/search/FilteredTermEnum.java
+++ b/src/java/org/apache/lucene/search/FilteredTermEnum.java
@@ -50,7 +50,7 @@ public abstract class FilteredTermEnum extends TermEnum {
/**
* Returns the docFreq of the current Term in the enumeration.
- * Initially invalid, valid after next() called for the first time.
+ * Returns -1 if no Term matches or all terms have been enumerated.
*/
public int docFreq() {
if (actualEnum == null) return -1;
@@ -77,7 +77,7 @@ public abstract class FilteredTermEnum extends TermEnum {
}
/** Returns the current Term in the enumeration.
- * Initially invalid, valid after next() called for the first time. */
+ * Returns null if no Term matches or all terms have been enumerated. */
public Term term() {
return currentTerm;
}
diff --git a/src/java/org/apache/lucene/search/FuzzyTermEnum.java b/src/java/org/apache/lucene/search/FuzzyTermEnum.java
index c0dd2a09367..aebda1be70f 100644
--- a/src/java/org/apache/lucene/search/FuzzyTermEnum.java
+++ b/src/java/org/apache/lucene/search/FuzzyTermEnum.java
@@ -54,6 +54,9 @@ public final class FuzzyTermEnum extends FilteredTermEnum {
/**
* Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
+ * <p>
+ * After calling the constructor the enumeration is already pointing to the first
+ * valid term if such a term exists.
*
* @param reader
* @param term
@@ -66,6 +69,9 @@ public final class FuzzyTermEnum extends FilteredTermEnum {
/**
* Creates a FuzzyTermEnum with an empty prefix.
+ * <p>
+ * After calling the constructor the enumeration is already pointing to the first
+ * valid term if such a term exists.
*
* @param reader
* @param term
@@ -80,7 +86,10 @@ public final class FuzzyTermEnum extends FilteredTermEnum {
/**
* Constructor for enumeration of all terms from specified <code>reader</code> which share a prefix of
* length <code>prefixLength</code> with <code>term</code> and which have a fuzzy similarity &gt;
- * <code>minSimilarity</code>.
+ * <code>minSimilarity</code>.
+ * <p>
+ * After calling the constructor the enumeration is already pointing to the first
+ * valid term if such a term exists.
*
* @param reader Delivers terms.
* @param term Pattern term.
diff --git a/src/java/org/apache/lucene/search/WildcardTermEnum.java b/src/java/org/apache/lucene/search/WildcardTermEnum.java
index 9cdac774db6..d2fcf33caf9 100644
--- a/src/java/org/apache/lucene/search/WildcardTermEnum.java
+++ b/src/java/org/apache/lucene/search/WildcardTermEnum.java
@@ -42,6 +42,9 @@ public class WildcardTermEnum extends FilteredTermEnum {
* Creates a new <code>WildcardTermEnum</code>. Passing in a
* {@link org.apache.lucene.index.Term Term} that does not contain a
* <code>WILDCARD_CHAR</code> will cause an exception to be thrown.
+ * <p>
+ * After calling the constructor the enumeration is already pointing to the first
+ * valid term if such a term exists.
*/
public WildcardTermEnum(IndexReader reader, Term term) throws IOException {
super();