Apache Lucene.Net 2.1 Class Library API

IndexReader.Document Method

Returns the stored fields of the

n
th
Document
in this index.

Overload List

Returns the stored fields of the

n
th
Document
in this index.

public virtual Document Document(int);

Get the {@link Lucene.Net.Documents.Document} at the

n
th position. The {@link Lucene.Net.Documents.FieldSelector} may be used to determine what {@link Lucene.Net.Documents.Field}s to load and how they should be loaded. NOTE: If this Reader (more specifically, the underlying {@link FieldsReader} is closed before the lazy {@link Lucene.Net.Documents.Field} is loaded an exception may be thrown. If you want the value of a lazy {@link Lucene.Net.Documents.Field} to be available after closing you must explicitly load it or fetch the Document again with a new loader.

public abstract Document Document(int,FieldSelector);

See Also

IndexReader Class | Lucene.Net.Index Namespace