Apache Lucene.Net 2.4.0 Class Library API

Searchable.Doc Method (Int32, FieldSelector)

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 the underlying Reader (more specifically, the underlying
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.

Document Doc(
   int n,
   FieldSelector fieldSelector
);

Parameters

n
Get the document at the
n
th position
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

Searchable Interface | Lucene.Net.Search Namespace | Searchable.Doc Overload List | | | | |