add note about non-reentrant StoredFields impls

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1458729 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2013-03-20 10:33:49 +00:00
parent 40456eb8e2
commit ce29415565
1 changed files with 7 additions and 1 deletions

View File

@ -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
* <p><b>NOTE</b>: 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.
*
* <p>See {@link DocumentStoredFieldVisitor}, which is a
* <code>StoredFieldVisitor</code> that builds the
* {@link Document} containing all stored fields. This is
* used by {@link IndexReader#document(int)}.