mirror of https://github.com/apache/lucene.git
javadocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1429519 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6db40b852d
commit
a347753992
|
@ -39,12 +39,15 @@ public class DocumentStoredFieldVisitor extends StoredFieldVisitor {
|
|||
private final StoredDocument doc = new StoredDocument();
|
||||
private final Set<String> fieldsToAdd;
|
||||
|
||||
/** Load only fields named in the provided <code>Set<String></code>. */
|
||||
/**
|
||||
* Load only fields named in the provided <code>Set<String></code>.
|
||||
* @param fieldsToAdd Set of fields to load, or <code>null</code> (all fields).
|
||||
*/
|
||||
public DocumentStoredFieldVisitor(Set<String> fieldsToAdd) {
|
||||
this.fieldsToAdd = fieldsToAdd;
|
||||
}
|
||||
|
||||
/** Load only fields named in the provided <code>Set<String></code>. */
|
||||
/** Load only fields named in the provided fields. */
|
||||
public DocumentStoredFieldVisitor(String... fields) {
|
||||
fieldsToAdd = new HashSet<String>(fields.length);
|
||||
for(String field : fields) {
|
||||
|
|
|
@ -181,17 +181,26 @@ public class IndexSearcher {
|
|||
return reader;
|
||||
}
|
||||
|
||||
/** Sugar for <code>.getIndexReader().document(docID)</code> */
|
||||
/**
|
||||
* Sugar for <code>.getIndexReader().document(docID)</code>
|
||||
* @see IndexReader#document(int)
|
||||
*/
|
||||
public StoredDocument doc(int docID) throws IOException {
|
||||
return reader.document(docID);
|
||||
}
|
||||
|
||||
/** Sugar for <code>.getIndexReader().document(docID, fieldVisitor)</code> */
|
||||
/**
|
||||
* Sugar for <code>.getIndexReader().document(docID, fieldVisitor)</code>
|
||||
* @see IndexReader#document(int, StoredFieldVisitor)
|
||||
*/
|
||||
public void doc(int docID, StoredFieldVisitor fieldVisitor) throws IOException {
|
||||
reader.document(docID, fieldVisitor);
|
||||
}
|
||||
|
||||
/** Sugar for <code>.getIndexReader().document(docID, fieldsToLoad)</code> */
|
||||
/**
|
||||
* Sugar for <code>.getIndexReader().document(docID, fieldsToLoad)</code>
|
||||
* @see IndexReader#document(int, Set)
|
||||
*/
|
||||
public final StoredDocument document(int docID, Set<String> fieldsToLoad) throws IOException {
|
||||
return reader.document(docID, fieldsToLoad);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue