Apache Lucene open-source search software
docs wrongly refer to termAtt instead of tokenStream
David Wayne Smileye6f237d4c399
diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.javaindex 06018621aa0..6be37faae10 100644--- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java+++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java@@ -30,7 +30,7 @@ import org.apache.lucene.util.BytesRef;* final TermToBytesRefAttribute termAtt = tokenStream.getAttribute(TermToBytesRefAttribute.class);* final BytesRef bytes = termAtt.getBytesRef();*- * while (termAtt.incrementToken() {+ * while (tokenStream.incrementToken() {** // you must call termAtt.fillBytesRef() before doing something with the bytes.* // this encodes the term value (internally it might be a char[], etc) into the bytes.