Skip to content

Apache Lucene open-source search software

file format bug

Robert Muir2b2ac70f8ab7
diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSimpleDocValuesFormat.java b/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSimpleDocValuesFormat.java
index b3159441755..7012ce9e196 100644
--- a/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSimpleDocValuesFormat.java
+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextSimpleDocValuesFormat.java
@@ -84,7 +84,7 @@ public class SimpleTextSimpleDocValuesFormat extends SimpleDocValuesFormat {
* baz[space][space][space][space][space]
* ...
* </pre>
- * so a document's value can be retrieved by seeking to startOffset + (9+2*pattern.length)*docid
+ * so a document's value can be retrieved by seeking to startOffset + (9+pattern.length+maxlength)*docid
* the extra 9 is 2 newlines, plus "length " itself.
*
* the reader can just scan this file when it opens, skipping over the data blocks