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

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

Syntax

C#
Document Doc(
	int n,
	FieldSelector fieldSelector
)
Visual Basic
Function Doc ( _
	n As Integer, _
	fieldSelector As FieldSelector _
) As Document
Visual C++
Document^ Doc(
	int n, 
	FieldSelector^ fieldSelector
)

Parameters

n
Type: System..::..Int32
Get the document at the
CopyC#
n
th position
fieldSelector
Type: Lucene.Net.Documents..::..FieldSelector
The {@link Lucene.Net.Documents.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