diff --git a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java index 340f2c41a13..b9ed951f898 100644 --- a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java +++ b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java @@ -39,12 +39,15 @@ public class DocumentStoredFieldVisitor extends StoredFieldVisitor { private final StoredDocument doc = new StoredDocument(); private final Set fieldsToAdd; - /** Load only fields named in the provided Set<String>. */ + /** + * Load only fields named in the provided Set<String>. + * @param fieldsToAdd Set of fields to load, or null (all fields). + */ public DocumentStoredFieldVisitor(Set fieldsToAdd) { this.fieldsToAdd = fieldsToAdd; } - /** Load only fields named in the provided Set<String>. */ + /** Load only fields named in the provided fields. */ public DocumentStoredFieldVisitor(String... fields) { fieldsToAdd = new HashSet(fields.length); for(String field : fields) { diff --git a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java index f6fb7c84bbe..865609428a8 100644 --- a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java +++ b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java @@ -181,17 +181,26 @@ public class IndexSearcher { return reader; } - /** Sugar for .getIndexReader().document(docID) */ + /** + * Sugar for .getIndexReader().document(docID) + * @see IndexReader#document(int) + */ public StoredDocument doc(int docID) throws IOException { return reader.document(docID); } - /** Sugar for .getIndexReader().document(docID, fieldVisitor) */ + /** + * Sugar for .getIndexReader().document(docID, fieldVisitor) + * @see IndexReader#document(int, StoredFieldVisitor) + */ public void doc(int docID, StoredFieldVisitor fieldVisitor) throws IOException { reader.document(docID, fieldVisitor); } - /** Sugar for .getIndexReader().document(docID, fieldsToLoad) */ + /** + * Sugar for .getIndexReader().document(docID, fieldsToLoad) + * @see IndexReader#document(int, Set) + */ public final StoredDocument document(int docID, Set fieldsToLoad) throws IOException { return reader.document(docID, fieldsToLoad); }