1 Jun 2007 01:14
[jira] Commented: (LUCENE-763) LuceneDictionary skips first word in enumeration
Steven Parkes (JIRA <jira <at> apache.org>
2007-05-31 23:14:15 GMT
2007-05-31 23:14:15 GMT
[
https://issues.apache.org/jira/browse/LUCENE-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500521
]
Steven Parkes commented on LUCENE-763:
--------------------------------------
Can we also update the javadocs to reflect the different semantics between terms() and terms(term)?
Here's some possible verbage. (Also tweaks the "after the given term" which I think isn't correct?)
{noformat}
Index: src/java/org/apache/lucene/index/IndexReader.java
===================================================================
--- src/java/org/apache/lucene/index/IndexReader.java (revision 543284)
+++ src/java/org/apache/lucene/index/IndexReader.java (working copy)
<at> <at> -539,16 +539,21 <at> <at>
setNorm(doc, field, Similarity.encodeNorm(value));
}
- /** Returns an enumeration of all the terms in the index.
- * The enumeration is ordered by Term.compareTo(). Each term
- * is greater than all that precede it in the enumeration.
+ /** Returns an enumeration of all the terms in the index. The
+ * enumeration is ordered by Term.compareTo(). Each term is greater
+ * than all that precede it in the enumeration. Note that after
+ * calling { <at> link #terms()}, { <at> link TermEnum#next()} must be called
+ * on the resulting enumeration before calling other methods such as
+ * { <at> link TermEnum#term()}.
* <at> throws IOException if there is a low-level IO error
(Continue reading)
RSS Feed