diff --git a/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java b/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java index 88ead6467cf..752c24568d5 100644 --- a/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java +++ b/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java @@ -27,7 +27,13 @@ import org.apache.lucene.document.DocumentStoredFieldVisitor; * values in an index. See {@link IndexReader#document(int, * StoredFieldVisitor)}. * - * See {@link DocumentStoredFieldVisitor}, which is a + *
NOTE: a {@code StoredFieldVisitor} implementation + * should not try to load or visit other stored documents in + * the same reader because the implementation of stored + * fields for most codecs is not reeentrant and you will see + * strange exceptions as a result. + * + *
See {@link DocumentStoredFieldVisitor}, which is a
* StoredFieldVisitor
that builds the
* {@link Document} containing all stored fields. This is
* used by {@link IndexReader#document(int)}.