My application needs to enumerate all terms for a specific field. To do that
I get the TermEnum using the following code:
TermEnum terms = reader.terms(new Term(fieldName, ));
I noticed that initially TermEnum is positioned at the first term. In other
words, I don't have to call
: TermEnum terms = reader.terms(new Term(fieldName, ));
:
: I noticed that initially TermEnum is positioned at the first term. In other
: words, I don't have to call terms.next() before calling terms.term(). This
: is different from the behavior of Iterator, Enumeration and ResultSet whose
Chris Hostetter writes:
I thought it was documented in the TermEnum interface, but looking at it
now I realize that not only does the TermEnum javadoc not explain it
very well, but the class FilteredTermEnum (which implements TermEnum)
acctually documents the oposite behavior...
public