lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4568] - new IndexReader.terms(myterm) skips over first term
Date Thu, 01 Nov 2001 21:26:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4568>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4568

new IndexReader.terms(myterm) skips over first term





------- Additional Comments From cutting@apache.org  2001-11-01 13:25 -------
This is mostly a documentation problem.  One must first call next() on a 
TermEnum created with IndexReader.terms(), but not one created by 
IndexReader.terms(Term).  In that case, one can check if the enun is already at 
its end by checking if enum.term() == null.

This is what PrefixQuery does, so PrefixQuery in fact works correctly.

Still, this API should be improved, or at least better documented.

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message