Method Document
Document(Int32)
Returns the stored fields of the n
th
Document
in this index.
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 IsDeleted(Int32) with the requested document ID to verify the document is not deleted.
Declaration
public virtual Document Document(int n)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n |
Returns
Type | Description |
---|---|
Document |
Document(Int32, FieldSelector)
Get the Document at the n
th position. The FieldSelector may be used to determine
what Fields to load and how they should
be loaded. NOTE: If this Reader (more specifically, the underlying
FieldsReader
) is closed before the lazy
Field is loaded an exception may be
thrown. If you want the value of a lazy
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 IsDeleted(Int32) with the requested document ID to verify the document is not deleted.
Declaration
public abstract Document Document(int n, FieldSelector fieldSelector)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | Get the document at the |
FieldSelector | fieldSelector | The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded. |
Returns
Type | Description |
---|---|
Document | The stored fields of the Document at the nth position |