Get the {@link Lucene.Net.Documents.Document} at the
CopyC#
n
th position. The {@link 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
CopyC#
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.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call {@link #IsDeleted(int)} with the requested document ID to verify the document is not deleted.

Namespace: Lucene.Net.Index
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public abstract Document Document(
	int n,
	FieldSelector fieldSelector
)
Visual Basic
Public MustOverride Function Document ( _
	n As Integer, _
	fieldSelector As FieldSelector _
) As Document
Visual C++
public:
virtual Document^ Document(
	int n, 
	FieldSelector^ fieldSelector
) abstract

Parameters

n
Type: System..::..Int32
Get the document at the
CopyC#
n
th position
fieldSelector
Type: Lucene.Net.Documents..::..FieldSelector
The {@link FieldSelector} to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.

Return Value

The stored fields of the {@link Lucene.Net.Documents.Document} at the nth position

See Also