blob: 4008d69a128088c0ac0a1315065d984b8631be3d [file] [log] [blame]
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" /><META NAME="save" CONTENT="history" /><title>SegmentReader Members</title><meta name="Language" content="en-us" /><meta name="System.Keywords" content="SegmentReader class" /><meta name="System.Keywords" content="SegmentReader class, all members" /><meta name="System.Keywords" content="Lucene.Net.Index.SegmentReader class" /><meta name="Microsoft.Help.Id" content="AllMembers.T:Lucene.Net.Index.SegmentReader" /><meta name="Microsoft.Help.ContentType" content="Reference" /><link rel="stylesheet" type="text/css" href="../styles/Presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"> </script><script type="text/javascript" src="../scripts/SplitScreen.js"> </script><script type="text/javascript" src="../scripts/Dropdown.js"> </script><script type="text/javascript" src="../scripts/script_manifold.js"> </script><script type="text/javascript" src="../scripts/script_feedBack.js"> </script><script type="text/javascript" src="../scripts/CheckboxMenu.js"> </script><script type="text/javascript" src="../scripts/CommonUtilities.js"> </script><meta name="container" content="Lucene.Net.Index" /><meta name="file" content="b138ec6e-f3b9-5c77-c62f-cd9bf417de9c" /><meta name="guid" content="b138ec6e-f3b9-5c77-c62f-cd9bf417de9c" /><xml><MSHelp:Attr Name="AssetID" Value="AllMembers.T:Lucene.Net.Index.SegmentReader" /><MSHelp:TOCTitle Title="SegmentReader Members" /><MSHelp:RLTitle Title="SegmentReader Members (Lucene.Net.Index)" /><MSHelp:Keyword Index="A" Term="AllMembers.T:Lucene.Net.Index.SegmentReader" /><MSHelp:Keyword Index="A" Term="frlrfLuceneNetIndexSegmentReaderMembersTopic" /><MSHelp:Keyword Index="K" Term="SegmentReader class" /><MSHelp:Keyword Index="K" Term="SegmentReader class, all members" /><MSHelp:Keyword Index="K" Term="Lucene.Net.Index.SegmentReader class" /><MSHelp:Attr Name="HelpPriority" Value="1" /><MSHelp:Attr Name="DevLang" Value="CSharp" /><MSHelp:Attr Name="DevLang" Value="VB" /><MSHelp:Attr Name="Locale" Value="en-us" /><MSHelp:Attr Name="TopicType" Value="kbSyntax" /><MSHelp:Attr Name="TopicType" Value="apiref" /><MSHelp:Attr Name="AssemblyVersion" Value="2.9.4.1" /></xml><link type="text/css" rel="stylesheet" href="../styles/highlight.css" /><script type="text/javascript" src="../scripts/highlight.js"> </script></head><body><input type="hidden" id="userDataCache" class="userDataStyle" /><input type="hidden" id="hiddenScrollOffset" /><img id="collapseImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" alt="Collapse image" title="Collapse image" /><img id="expandImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" alt="Expand Image" title="Expand Image" /><img id="collapseAllImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" /><img id="expandAllImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" /><img id="dropDownImage" style="display:none; height:0; width:0;" src="../icons/dropdown.gif" /><img id="dropDownHoverImage" style="display:none; height:0; width:0;" src="../icons/dropdownHover.gif" /><img id="copyImage" style="display:none; height:0; width:0;" src="../icons/copycode.gif" alt="Copy image" title="Copy image" /><img id="copyHoverImage" style="display:none; height:0; width:0;" src="../icons/copycodeHighlight.gif" alt="CopyHover image" title="CopyHover image" /><div id="header"><table id="topTable" cellspacing="0" cellpadding="0"><tr><td><span onclick="ExpandCollapseAll(toggleAllImage)" style="cursor:default;" onkeypress="ExpandCollapseAll_CheckKey(toggleAllImage, event)" tabindex="0"><img ID="toggleAllImage" class="toggleAll" src="../icons/collapse_all.gif" /> <label id="collapseAllLabel" for="toggleAllImage" style="display: none;">Collapse All</label><label id="expandAllLabel" for="toggleAllImage" style="display: none;">Expand All</label> </span><span>    </span><span id="devlangsDropdown" class="filter" tabindex="0"><img id="devlangsDropdownImage" src="../icons/dropdown.gif" /> <label id="devlangsMenuAllLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: All </nobr></label><label id="devlangsMenuMultipleLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Multiple </nobr></label><label id="devlangsMenuCSharpLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: C# </nobr></label><label id="devlangsMenuVisualBasicLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual Basic </nobr></label><label id="devlangsMenuManagedCPlusPlusLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual C++ </nobr></label></span><span>    </span><span id="memberOptionsDropdown" class="filter" tabindex="0"><img id="memberOptionsDropdownImage" src="../icons/dropdown.gif" /> <label id="memberOptionsMenuAllLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Show All </nobr></label><label id="memberOptionsMenuMultipleLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Filtered </nobr></label><label id="memberOptionsMenuProtectedLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Filtered </nobr></label><label id="memberOptionsMenuInheritedLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Filtered </nobr></label></span></td></tr></table><div id="devlangsMenu"><input id="CSharpCheckbox" type="checkbox" data="CSharp,cs,'persist'" value="on" onClick="SetLanguage(this)" /><label class="checkboxLabel" for="CSharpCheckbox">C#</label><br /><input id="VisualBasicCheckbox" type="checkbox" data="VisualBasic,vb,'persist'" value="on" onClick="SetLanguage(this)" /><label class="checkboxLabel" for="VisualBasicCheckbox">Visual Basic</label><br /><input id="ManagedCPlusPlusCheckbox" type="checkbox" data="ManagedCPlusPlus,cpp,'persist'" value="on" onClick="SetLanguage(this)" /><label class="checkboxLabel" for="ManagedCPlusPlusCheckbox">Visual C++</label><br /></div><div id="memberOptionsMenu"><input id="ProtectedCheckbox" type="checkbox" data="Protected" value="on" onClick="SetMemberOptions(this, 'vis')" /><label class="checkboxLabel" for="ProtectedCheckbox">Include Protected Members</label><br /><input id="InheritedCheckbox" type="checkbox" data="Inherited" value="on" onClick="SetMemberOptions(this, 'decl')" /><label class="checkboxLabel" for="InheritedCheckbox">Include Inherited Members</label><br /></div><table id="bottomTable" cellpadding="0" cellspacing="0"><tr id="headerTableRow1"><td align="left"><span id="runningHeaderText">Lucene.Net Class Libraries</span></td></tr><tr id="headerTableRow2"><td align="left"><span id="nsrTitle">SegmentReader Members</span></td></tr><tr id="headerTableRow3"><td align="left"><a href="1a9af311-4840-f2ea-3490-d59d3f6bc720.htm">SegmentReader Class</a> <a href="#constructorTableToggle" onclick="OpenSection(constructorTableToggle)">Constructors</a> <a href="#methodTableToggle" onclick="OpenSection(methodTableToggle)">Methods</a> <a href="#fieldTableToggle" onclick="OpenSection(fieldTableToggle)">Fields</a> <a href="#propertyTableToggle" onclick="OpenSection(propertyTableToggle)">Properties</a> <a href="#seeAlsoToggle" onclick="OpenSection(seeAlsoToggle)">See Also</a> <span id="headfeedbackarea" class="feedbackhead"><a href="javascript:SubmitFeedback('','Lucene.Net Class Libraries','','','','%0\dYour%20feedback%20is%20used%20to%20improve%20the%20documentation%20and%20the%20product.%20Your%20e-mail%20address%20will%20not%20be%20used%20for%20any%20other%20purpose%20and%20is%20disposed%20of%20after%20the%20issue%20you%20report%20is%20resolved.%20%20While%20working%20to%20resolve%20the%20issue%20that%20you%20report,%20you%20may%20be%20contacted%20via%20e-mail%20to%20get%20further%20details%20or%20clarification%20on%20the%20feedback%20you%20sent.%20After%20the%20issue%20you%20report%20has%20been%20addressed,%20you%20may%20receive%20an%20e-mail%20to%20let%20you%20know%20that%20your%20feedback%20has%20been%20addressed.%0\A%0\d','Customer%20Feedback');">Send Feedback</a></span></td></tr></table><table id="gradientTable"><tr><td class="nsrBottom" background="../icons/gradient.gif" /></tr></table></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()" /><span style="color: DarkGray"></span><p /><p>The <a href="1a9af311-4840-f2ea-3490-d59d3f6bc720.htm">SegmentReader</a> type exposes the following members.</p><h1 class="heading"><span onclick="ExpandCollapse(constructorTableToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(constructorTableToggle, event)" tabindex="0"><img id="constructorTableToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Constructors</span></h1><div id="constructorTableSection" class="section" name="collapseableSection" style=""><table id="memberList" class="members" frame="lhs" cellpadding="2"><col width="10%" /><tr><th class="iconColumn">
 
</th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="3d2ed2bd-903e-d7d3-0071-c85c7a0ef540.htm">SegmentReader</a></td><td><div class="summary">Initializes a new instance of the <a href="1a9af311-4840-f2ea-3490-d59d3f6bc720.htm">SegmentReader</a> class</div></td></tr></table></div><h1 class="heading"><span onclick="ExpandCollapse(methodTableToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(methodTableToggle, event)" tabindex="0"><img id="methodTableToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Methods</span></h1><div id="methodTableSection" class="section" name="collapseableSection" style=""><table id="memberList" class="members" frame="lhs" cellpadding="2"><col width="10%" /><tr><th class="iconColumn">
 
</th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="e8f7fb6c-02ed-9b92-4fe8-6d2c78384f97.htm">AcquireWriteLock</a></td><td><div class="summary">Does nothing by default. Subclasses that require a write lock for
index modifications must implement this method.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="bab5c7f3-7fac-3662-a473-a7a5cd074024.htm">Clone<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td> (Overrides <a href="32ff5509-e9bd-890c-f854-71b71e6ff813.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Clone<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="09082881-31f7-4d48-50fb-a637b16a0c53.htm">Clone(Boolean)</a></td><td> (Overrides <a href="5fc73c86-5d7c-fdbf-b0a6-654453f97263.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Clone(Boolean)</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="d570cb5f-da81-1edd-ed72-007ba8d84630.htm">CloneDeletedDocs</a></td><td><div class="summary"> Clones the deleteDocs BitVector. May be overridden by subclasses. New and experimental.</div></td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="f26b9f97-49b7-18f1-fcc9-e896e4169468.htm">CloneNormBytes</a></td><td><div class="summary"> Clones the norm bytes. May be overridden by subclasses. New and experimental.</div></td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="7a6b09b7-d2d9-f2bf-3432-fbfd382c5c2f.htm">Close</a></td><td><div class="summary"> Closes files associated with this index.
Also saves any new deletions to disk.
No other methods should be called after this has been called.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="69332939-397e-a379-ffbb-cab6e3299834.htm">Commit<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td><div class="summary"> Commit changes resulting from delete, undeleteAll, or
setNorm operations
If an exception is hit, then either no changes or all
changes will have been committed to the index
(transactional semantics).
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="d1242cba-8f21-e1ab-e346-d8e3fa0479ea.htm">Commit(IDictionary<span class="languageSpecificText"><span class="cs">&lt;</span><span class="vb">(Of </span><span class="cpp">&lt;</span><span class="fs">&lt;'</span><span class="nu">(</span></span>String, String<span class="languageSpecificText"><span class="cs">&gt;</span><span class="vb">)</span><span class="cpp">&gt;</span><span class="fs">&gt;</span><span class="nu">)</span></span>)</a></td><td><div class="summary"> Commit changes resulting from delete, undeleteAll, or
setNorm operations
If an exception is hit, then either no changes or all
changes will have been committed to the index
(transactional semantics).
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="913d603a-ccf9-b5f5-048b-da50ee76d65d.htm">DecRef</a></td><td><div class="summary"> Expert: decreases the refCount of this IndexReader
instance. If the refCount drops to 0, then pending
changes (if any) are committed to the index and this
reader is closed.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="eebb56dd-b2f5-1b86-95da-6413795ee03b.htm">DeleteDocument</a></td><td><div class="summary">Deletes the document numbered <span id="cbc_1" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">docNum</pre></div></span>. Once a document is
deleted it will not appear in TermDocs or TermPostitions enumerations.
Attempts to read its field with the {@link #document}
method will result in an error. The presence of this document may still be
reflected in the {@link #docFreq} statistic, though
this will be corrected eventually as the index is further modified.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="b33902b6-7e77-fa3d-29e0-20f765d0abe8.htm">DeleteDocuments</a></td><td><div class="summary">Deletes all documents that have a given <span id="cbc_3" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">term</pre></div></span> indexed.
This is useful if one uses a document field to hold a unique ID string for
the document. Then to delete such a document, one merely constructs a
term with the appropriate field and the unique ID string as its text and
passes it to this method.
See {@link #DeleteDocument(int)} for information about when this deletion will
become effective.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="4139ca01-d3a8-ff5f-679f-567ea20422a3.htm">Directory</a></td><td><div class="summary">Returns the directory this index resides in. </div> (Overrides <a href="aa6bd7f0-6082-b624-87e5-24d7f842fa1a.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Directory<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="255e4f12-9c77-3a8f-506c-e3c629866508.htm">Dispose</a></td><td><div class="summary">
.NET
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="ecd16411-7d29-2765-96a3-32649118b755.htm">DocFreq</a></td><td> (Overrides <a href="ea7dcc64-1532-6530-fb10-98f97c42961b.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DocFreq(Term)</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="f8f8c898-825d-d087-6c56-291e7719dc1f.htm">DoClose</a></td><td> (Overrides <a href="c2275c04-5cc4-0a3c-5078-26adc9d1272e.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DoClose<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="4d5ad040-f708-ce91-ec06-50ed656caece.htm">DoCommit<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td> <font color="red"><b>Obsolete. </b></font> (Overrides <a href="564532de-aef4-3df3-b225-41330794d12d.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DoCommit<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="3fe393d6-65e2-136f-02c9-e7c9ea47c96e.htm">DoCommit(IDictionary<span class="languageSpecificText"><span class="cs">&lt;</span><span class="vb">(Of </span><span class="cpp">&lt;</span><span class="fs">&lt;'</span><span class="nu">(</span></span>String, String<span class="languageSpecificText"><span class="cs">&gt;</span><span class="vb">)</span><span class="cpp">&gt;</span><span class="fs">&gt;</span><span class="nu">)</span></span>)</a></td><td> (Overrides <a href="14f00280-21e2-5eea-a3ad-d83979bf3803.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DoCommit(IDictionary<span class="languageSpecificText"><span class="cs">&lt;</span><span class="vb">(Of </span><span class="cpp">&lt;</span><span class="fs">&lt;'</span><span class="nu">(</span></span>String, String<span class="languageSpecificText"><span class="cs">&gt;</span><span class="vb">)</span><span class="cpp">&gt;</span><span class="fs">&gt;</span><span class="nu">)</span></span>)</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="63c80382-dcd3-676f-e5fa-b80c26df9501.htm">Document(Int32)</a></td><td><div class="summary"> Returns the stored fields of the <span id="cbc_5" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">n</pre></div></span><sup>th</sup><span id="cbc_6" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">Document</pre></div></span> in this index.
<p /><b>NOTE:</b> 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.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="7e343ee0-c3c2-f53b-37a5-eed06c9ded47.htm">Document(Int32, FieldSelector)</a></td><td> (Overrides <a href="2b0fb79b-a0a2-2f85-8118-3a54dd3916f6.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Document(Int32, FieldSelector)</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="7c01b38b-f4d5-d6e3-bb1f-19752aa324fa.htm">DoDelete</a></td><td> (Overrides <a href="17fa6137-f2bb-b3ac-7a93-c512a091b32a.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DoDelete(Int32)</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="0959fe17-0c5c-05e2-9d31-7293dc720612.htm">DoSetNorm</a></td><td> (Overrides <a href="e2318f2a-bdab-3a82-220b-82597bacecce.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DoSetNorm(Int32, String, Byte)</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="f23a3048-3533-93af-7607-3fad5df93908.htm">DoUndeleteAll</a></td><td> (Overrides <a href="0dee4540-614c-d2cf-1cd5-21f7085b5c7e.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>DoUndeleteAll<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="aaf27130-533a-393c-374a-3a7de387e216.htm">EnsureOpen</a></td><td> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/bsc2ak47" target="_blank">Equals</a></td><td><div class="summary">Determines whether the specified <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a> is equal to the current <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="8e8ac820-b7b1-efbb-f15e-485919abb9a7.htm">FieldInfos</a></td><td /></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/4k87zsw7" target="_blank">Finalize</a></td><td><div class="summary">Allows an <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a> to attempt to free resources and perform other cleanup operations before the <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a> is reclaimed by garbage collection.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="10038b7e-e490-139e-2dd9-3a53f08bf24a.htm">Flush<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td><div class="summary" /> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="ad6057dc-5132-a8e5-f58e-619b7f2c6cf8.htm">Flush(IDictionary<span class="languageSpecificText"><span class="cs">&lt;</span><span class="vb">(Of </span><span class="cpp">&lt;</span><span class="fs">&lt;'</span><span class="nu">(</span></span>String, String<span class="languageSpecificText"><span class="cs">&gt;</span><span class="vb">)</span><span class="cpp">&gt;</span><span class="fs">&gt;</span><span class="nu">)</span></span>)</a></td><td> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;static;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /><img src="../icons/static.gif" alt="Static member" title="Static member" /></td><td><a href="0b43629b-eff2-f5d8-140a-70112ec3388d.htm">Get(SegmentInfo)</a></td><td> <font color="red"><b>Obsolete. </b></font></td></tr><tr data="public;static;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /><img src="../icons/static.gif" alt="Static member" title="Static member" /></td><td><a href="dcae0e7a-45da-6516-b5c2-3371a18e0cf4.htm">Get(Boolean, SegmentInfo, Int32)</a></td><td /></tr><tr data="public;static;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /><img src="../icons/static.gif" alt="Static member" title="Static member" /></td><td><a href="b7cc4001-06a3-b4ec-7d3a-722ede901011.htm">Get(Boolean, Directory, SegmentInfo, Int32, Boolean, Int32)</a></td><td /></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="f9d1256f-826c-cf07-b9ce-6e0ec17346cf.htm">GetCommitUserData<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td><div class="summary"> Retrieve the String userData optionally passed to
IndexWriter#commit. This will return null if {@link
IndexWriter#Commit(Map)} has never been called for
this index.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="ef671aa6-232f-000b-402f-5062f780b15b.htm">GetDeletesCacheKey</a></td><td> (Overrides <a href="1773be10-2198-7f92-ba05-56aa0b36cb6c.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetDeletesCacheKey<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="3f6781cc-ca2b-e105-4a4c-a895e4970b52.htm">GetDisableFakeNorms</a></td><td> <font color="red"><b>Obsolete. </b></font><div class="summary">Expert: Return the state of the flag that disables fakes norms in favor of representing the absence of field norms with null.</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="926e9136-e3e5-d4cc-5efd-bec6de8e4d1a.htm">GetFieldCacheKey</a></td><td> <font color="red"><b>Obsolete. </b></font> (Overrides <a href="0ad6b62e-e0b4-5040-c2ce-8930f324b2ec.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetFieldCacheKey<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="471f2427-93d7-e525-5cca-8c5ad9e37070.htm">GetFieldNames</a></td><td> (Overrides <a href="bdb8bc81-10e8-6a35-0fd8-b4ad0549aebc.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetFieldNames(IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>FieldOption)</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/zdee4b3y" target="_blank">GetHashCode</a></td><td><div class="summary">Serves as a hash function for a particular type. </div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="04449b83-4291-4005-7b0d-45a699725fae.htm">GetIndexCommit</a></td><td><div class="summary"> Expert: return the IndexCommit that this reader has
opened. This method is only implemented by those
readers that correspond to a Directory with its own
segments_N file.
<p /><b>WARNING</b>: this API is new and experimental and
may suddenly change.<p /></div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="5892dcab-25aa-6c4e-b597-1e1202918edc.htm">GetNorms</a></td><td /></tr><tr data="public;static;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /><img src="../icons/static.gif" alt="Static member" title="Static member" /></td><td><a href="30e8c680-edc7-6637-eca3-9473579fc0be.htm">GetOnlySegmentReader(Directory)</a></td><td><div class="summary"> Lotsa tests did hacks like:<br />
SegmentReader reader = (SegmentReader) IndexReader.open(dir);<br />
They broke. This method serves as a hack to keep hacks working
</div></td></tr><tr data="public;static;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /><img src="../icons/static.gif" alt="Static member" title="Static member" /></td><td><a href="c34b600a-77eb-f290-233b-6dad5065005f.htm">GetOnlySegmentReader(IndexReader)</a></td><td /></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="7d0fe5b0-7f54-4346-ce9b-75d021772bef.htm">GetRefCount</a></td><td><div class="summary">Expert: returns the current refCount for this reader </div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="f2f929cd-1ab9-8dd3-9c2f-64b1e19b7e48.htm">GetSegmentName</a></td><td><div class="summary"> Return the name of the segment this reader is reading.</div></td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="28a9c1b4-79bc-cd40-1e1d-dec33a0af1cd.htm">GetSequentialSubReaders</a></td><td><div class="summary">Expert: returns the sequential sub readers that this
reader is logically composed of. For example,
IndexSearcher uses this API to drive searching by one
sub reader at a time. If this reader is not composed
of sequential child readers, it should return null.
If this method returns an empty array, that means this
reader is a null reader (for example a MultiReader
that has no sub readers).
<p />
NOTE: You should not try using sub-readers returned by
this method to make any changes (setNorm, deleteDocument,
etc.). While this might succeed for one composite reader
(like MultiReader), it will most likely lead to index
corruption for other readers (like DirectoryReader obtained
through {@link #open}. Use the parent reader directly.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="965fbc63-c97a-d8e3-9067-977720ae5071.htm">GetTermFreqVector(Int32, TermVectorMapper)</a></td><td> (Overrides <a href="0b03daa0-30d3-f63b-0a4b-236a040390d3.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetTermFreqVector(Int32, TermVectorMapper)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="d8d2d2ce-7a53-8853-530f-9361308b02ae.htm">GetTermFreqVector(Int32, String)</a></td><td><div class="summary">Return a term frequency vector for the specified document and field. The
vector returned contains term numbers and frequencies for all terms in
the specified field of this document, if the field had storeTermVector
flag set. If the flag was not set, the method returns null.
</div> (Overrides <a href="7ad1140b-088e-20fa-bcf5-e40fd6d2edb7.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetTermFreqVector(Int32, String)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="08f40c3e-3553-0435-5e32-68c74a97982e.htm">GetTermFreqVector(Int32, String, TermVectorMapper)</a></td><td> (Overrides <a href="8c11644a-c37b-92fa-de35-c3c8678a90d0.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetTermFreqVector(Int32, String, TermVectorMapper)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="13b263ae-726d-fef3-36c6-cb163ff2e040.htm">GetTermFreqVectors</a></td><td><div class="summary">Return an array of term frequency vectors for the specified document.
The array contains a vector for each vectorized field in the document.
Each vector vector contains term numbers and frequencies for all terms
in a given vectorized field.
If no such fields existed, the method returns null.
</div> (Overrides <a href="d85a77b3-9623-ba81-1619-4ffe06ea1276.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetTermFreqVectors(Int32)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="a4d5461f-5f1c-2434-3b9e-47462d0ab3c5.htm">GetTermInfosIndexDivisor</a></td><td> (Overrides <a href="a0f7e230-3502-0dfc-9ed3-31fa913cd19a.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetTermInfosIndexDivisor<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/dfwy45w9" target="_blank">GetType</a></td><td><div class="summary">Gets the <a href="http://msdn2.microsoft.com/en-us/library/42892f65" target="_blank">Type</a> of the current instance.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="a4ee8f2a-2002-202f-ef0a-1c33f759dae5.htm">GetUniqueTermCount</a></td><td> (Overrides <a href="c615355f-3bc5-66b8-3acd-32c887d621a3.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>GetUniqueTermCount<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="3f62c416-8a6e-cdfd-d576-512e3ec3b10e.htm">GetVersion</a></td><td><div class="summary"> Version number when this IndexReader was opened. Not implemented in the
IndexReader base class.
<p />
If this reader is based on a Directory (ie, was created by calling
{@link #Open}, or {@link #Reopen} on a reader based on a Directory), then
this method returns the version recorded in the commit that the reader
opened. This version is advanced every time {@link IndexWriter#Commit} is
called.
<p /><p />
If instead this reader is a near real-time reader (ie, obtained by a call
to {@link IndexWriter#GetReader}, or by calling {@link #Reopen} on a near
real-time reader), then this method returns the version of the last
commit done by the writer. Note that even as further changes are made
with the writer, the version will not changed until a commit is
completed. Thus, you should not rely on this method to determine when a
near real-time reader should be opened. Use {@link #IsCurrent} instead.
<p /></div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="730d151d-f5c3-7f3f-e5a5-4e2480129354.htm">HasDeletions</a></td><td> (Overrides <a href="ef6ae268-5ceb-e765-a9d0-47147e885363.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>HasDeletions<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="88994bfb-a985-d553-ef02-14d5edc86857.htm">HasNorms</a></td><td> (Overrides <a href="2ddd3b06-b1d8-9f5a-9d18-4a381a6d0d53.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>HasNorms(String)</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="37574514-623e-4a9a-fba0-f2e579f16eab.htm">IncRef</a></td><td><div class="summary"> Expert: increments the refCount of this IndexReader
instance. RefCounts are used to determine when a
reader can be closed safely, i.e. as soon as there are
no more references. Be sure to always call a
corresponding {@link #decRef}, in a finally clause;
otherwise the reader may never be closed. Note that
{@link #close} simply calls decRef(), which means that
the IndexReader will not really be closed until {@link
#decRef} has been called for all outstanding
references.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="d50cb231-b309-bb0f-b78c-946cd7fcacf2.htm">IsCurrent</a></td><td><div class="summary"> Check whether any new changes have occurred to the index since this
reader was opened.
<p />
If this reader is based on a Directory (ie, was created by calling
{@link #open}, or {@link #reopen} on a reader based on a Directory), then
this method checks if any further commits (see {@link IndexWriter#commit}
have occurred in that directory).
<p /><p />
If instead this reader is a near real-time reader (ie, obtained by a call
to {@link IndexWriter#getReader}, or by calling {@link #reopen} on a near
real-time reader), then this method checks if either a new commmit has
occurred, or any new uncommitted changes have taken place via the writer.
Note that even if the writer has only performed merging, this method will
still return false.
<p /><p />
In any event, if this returns false, you should call {@link #reopen} to
get a new reader that sees the changes.
<p /></div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="1a0b6a83-c2f0-76a6-1a99-15b6a91bc14a.htm">IsDeleted</a></td><td> (Overrides <a href="683184a4-a417-7b5c-9da5-a9c3ca029f41.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>IsDeleted(Int32)</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="23c992ae-c888-476d-5522-a9613afc3e8e.htm">IsOptimized</a></td><td><div class="summary"> Checks is the index is optimized (if it has a single segment and
no deletions). Not implemented in the IndexReader base class.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="83498a3d-51a6-4bf6-f79f-a83940e57dcf.htm">MaxDoc</a></td><td> (Overrides <a href="78cc24a4-8866-9494-be7b-d2e237d2f22b.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>MaxDoc<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/57ctke0a" target="_blank">MemberwiseClone</a></td><td><div class="summary">Creates a shallow copy of the current <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="957ceb63-20f6-2e63-11b9-931d3225d062.htm">Norms(String)</a></td><td> (Overrides <a href="b71ff2c7-4ed9-12b6-3159-afb98602ee20.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Norms(String)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="5b5c33c7-620f-7a0b-5c41-1d2878050066.htm">Norms(String, <span class="languageSpecificText"><span class="cpp">array&lt;</span></span>Byte<span class="languageSpecificText"><span class="cpp">&gt;</span><span class="cs">[]</span><span class="vb">()</span><span class="nu">[]</span><span class="fs">[]</span></span>, Int32)</a></td><td><div class="summary">Read norms into a pre-allocated array. </div> (Overrides <a href="d3981ee1-2cfd-0a76-7775-9fa46c6e189b.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Norms(String, <span class="languageSpecificText"><span class="cpp">array&lt;</span></span>Byte<span class="languageSpecificText"><span class="cpp">&gt;</span><span class="cs">[]</span><span class="vb">()</span><span class="nu">[]</span><span class="fs">[]</span></span>, Int32)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="6ca34deb-5328-db55-3548-59bcf0789e93.htm">NormsClosed<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td /></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="68b3d86c-a03d-032a-3b3d-745805a11680.htm">NormsClosed(String)</a></td><td /></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="c6f2b6e4-3396-147a-64aa-2c13016df327.htm">NumDeletedDocs</a></td><td><div class="summary">Returns the number of deleted documents. </div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="c05855c5-ee9f-ccd1-852b-c0d226b6de00.htm">NumDocs</a></td><td> (Overrides <a href="6d46d7e1-6c77-8a78-0a4a-1c8f11bb7ded.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>NumDocs<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="558b74b4-e8be-807a-5041-19342e99d995.htm">Reopen<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td><div class="summary"> Refreshes an IndexReader if the index has changed since this instance
was (re)opened.
<p />
Opening an IndexReader is an expensive operation. This method can be used
to refresh an existing IndexReader to reduce these costs. This method
tries to only load segments that have changed or were created after the
IndexReader was (re)opened.
<p />
If the index has not changed since this instance was (re)opened, then this
call is a NOOP and returns this instance. Otherwise, a new instance is
returned. The old instance is <b>not</b> closed and remains usable.<br /><p />
If the reader is reopened, even though they share
resources internally, it's safe to make changes
(deletions, norms) with the new reader. All shared
mutable state obeys "copy on write" semantics to ensure
the changes are not seen by other readers.
<p />
You can determine whether a reader was actually reopened by comparing the
old instance with the instance returned by this method:
<pre>
IndexReader reader = ...
...
IndexReader newReader = r.reopen();
if (newReader != reader) {
... // reader was reopened
reader.close();
}
reader = newReader;
...
</pre>
Be sure to synchronize that code so that other threads,
if present, can never use reader after it has been
closed and before it's switched to newReader.
<p /><b>NOTE</b>: If this reader is a near real-time
reader (obtained from {@link IndexWriter#GetReader()},
reopen() will simply call writer.getReader() again for
you, though this may change in the future.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="4dde9004-25d5-46fb-eb87-e95346e1ed32.htm">Reopen(Boolean)</a></td><td><div class="summary">Just like {@link #Reopen()}, except you can change the
readOnly of the original reader. If the index is
unchanged but readOnly is different then a new reader
will be returned.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="0085d4a9-7640-0a39-763f-6f2b20d4e5aa.htm">Reopen(IndexCommit)</a></td><td><div class="summary">Expert: reopen this reader on a specific commit point.
This always returns a readOnly reader. If the
specified commit point matches what this reader is
already on, and this reader is already readOnly, then
this same instance is returned; if it is not already
readOnly, a readOnly clone is returned.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="7047f24d-af7c-6c0d-a4c9-0f3e17abcf56.htm">SetDisableFakeNorms</a></td><td> <font color="red"><b>Obsolete. </b></font><div class="summary">Expert: Set the state of the flag that disables fakes norms in favor of representing the absence of field norms with null.</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="5289917c-c054-81f2-d550-6ade409746cf.htm">SetNorm(Int32, String, Byte)</a></td><td><div class="summary">Expert: Resets the normalization factor for the named field of the named
document. The norm represents the product of the field's {@link
Lucene.Net.Documents.Fieldable#SetBoost(float) boost} and its {@link Similarity#LengthNorm(String,
int) length normalization}. Thus, to preserve the length normalization
values when resetting this, one should base the new value upon the old.
<b>NOTE:</b> If this field does not store norms, then
this method call will silently do nothing.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="23c9103e-ed02-00eb-ef71-d96bc206225e.htm">SetNorm(Int32, String, Single)</a></td><td><div class="summary">Expert: Resets the normalization factor for the named field of the named
document.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="50e341ca-03c1-5663-8344-d6df4b2701ae.htm">SetTermInfosIndexDivisor</a></td><td> <font color="red"><b>Obsolete. </b></font><div class="summary"><p />For IndexReader implementations that use
TermInfosReader to read terms, this sets the
indexDivisor to subsample the number of indexed terms
loaded into memory. This has the same effect as {@link
IndexWriter#setTermIndexInterval} except that setting
must be done at indexing time while this setting can be
set per reader. When set to N, then one in every
N*termIndexInterval terms in the index is loaded into
memory. By setting this to a value &gt; 1 you can reduce
memory usage, at the expense of higher latency when
loading a TermInfo. The default value is 1.<p /><b>NOTE:</b> you must call this before the term
index is loaded. If the index is already loaded,
an IllegalStateException is thrown.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="a3fcb5a6-e75f-ffdc-9223-2184b603face.htm">TermDocs<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td> (Overrides <a href="08b56fea-0139-9c2b-81a3-8ff661af2fd9.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>TermDocs<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="0f76cb32-1c45-6095-af33-d8450acd08bd.htm">TermDocs(Term)</a></td><td> (Overrides <a href="f8ca0439-87a5-a6a4-54d8-bc3a2e396c1c.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>TermDocs(Term)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="85054545-5438-aeb5-1c34-495ec2935dd3.htm">TermPositions<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td> (Overrides <a href="fc51d200-d275-bb35-382d-fadc767a11d0.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>TermPositions<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="9ca33a95-2623-6deb-cb0d-8c4c209da970.htm">TermPositions(Term)</a></td><td><div class="summary">Returns an enumeration of all the documents which contain
<span id="cbc_9" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">term</pre></div></span>. For each document, in addition to the document number
and frequency of the term in that document, a list of all of the ordinal
positions of the term in the document is available. Thus, this method
implements the mapping:
<p /><ul>
Term    =&gt;    &lt;docNum, freq,
&lt;pos<sub>1</sub>, pos<sub>2</sub>, ...
pos<sub>freq-1</sub>&gt;
&gt;<sup>*</sup></ul><p /> This positional information facilitates phrase and proximity searching.
<p />The enumeration is ordered by document number. Each document number is
greater than all that precede it in the enumeration.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="13a8463e-fd82-0aec-6148-1b94d56db6cf.htm">Terms<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td> (Overrides <a href="b1af8ab6-8472-9add-b2ad-30b61889578a.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Terms<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="f832beb4-604d-150f-5f50-05c85d722c0d.htm">Terms(Term)</a></td><td> (Overrides <a href="d7e142bd-18af-7229-47da-6f9af6a65c22.htm">IndexReader<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Terms(Term)</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="d1adaeb8-508c-48cf-ef78-e8a96d1a3ed1.htm">TermsIndexLoaded</a></td><td /></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/7bxwbwt2" target="_blank">ToString</a></td><td><div class="summary">Returns a <a href="http://msdn2.microsoft.com/en-us/library/s1wwdcbf" target="_blank">String</a> that represents the current <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="b9cc5c26-8b51-c006-5c41-a1c1be78385d.htm">UndeleteAll</a></td><td><div class="summary">Undeletes all documents currently marked as deleted in this index.
</div> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr></table></div><h1 class="heading"><span onclick="ExpandCollapse(fieldTableToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(fieldTableToggle, event)" tabindex="0"><img id="fieldTableToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Fields</span></h1><div id="fieldTableSection" class="section" name="collapseableSection" style=""><table id="memberList" class="members" frame="lhs" cellpadding="2"><col width="10%" /><tr><th class="iconColumn">
 
</th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protfield.gif" alt="Protected field" title="Protected field" /></td><td><a href="baed67bb-7d76-3d8f-4050-f3a9ce3abe90.htm">hasChanges</a></td><td> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="protected;declared;notNetfw;"><td><img src="../icons/protfield.gif" alt="Protected field" title="Protected field" /></td><td><a href="1e791466-9cc1-27e9-7800-b4a1a4dee014.htm">readOnly</a></td><td /></tr></table></div><h1 class="heading"><span onclick="ExpandCollapse(propertyTableToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(propertyTableToggle, event)" tabindex="0"><img id="propertyTableToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Properties</span></h1><div id="propertyTableSection" class="section" name="collapseableSection" style=""><table id="memberList" class="members" frame="lhs" cellpadding="2"><col width="10%" /><tr><th class="iconColumn">
 
</th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubproperty.gif" alt="Public property" title="Public property" /></td><td><a href="405884d0-7219-64f1-564a-e3842fa9dbc1.htm">core_ForNUnit</a></td><td /></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubproperty.gif" alt="Public property" title="Public property" /></td><td><a href="64352e7b-d00d-4ef4-3d71-febbb670222c.htm">deletedDocs_ForNUnit</a></td><td /></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubproperty.gif" alt="Public property" title="Public property" /></td><td><a href="c52d5aa1-d727-9473-2b53-44d1a00e78eb.htm">deletedDocsRef_ForNUnit</a></td><td /></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubproperty.gif" alt="Public property" title="Public property" /></td><td><a href="e5054931-94ad-a810-ae8f-f391f2197016.htm">hasChanges_ForNUnit</a></td><td> (Inherited from <a href="4919df1c-c434-d92d-ae43-1f44d0246cd4.htm">IndexReader</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubproperty.gif" alt="Public property" title="Public property" /></td><td><a href="ac0cd78c-1404-b411-0c78-47569b2ca18e.htm">norms_ForNUnit</a></td><td /></tr></table></div><h1 class="heading"><span onclick="ExpandCollapse(seeAlsoToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(seeAlsoToggle, event)" tabindex="0"><img id="seeAlsoToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />See Also</span></h1><div id="seeAlsoSection" class="section" name="collapseableSection" style=""><div class="seeAlsoStyle"><a href="1a9af311-4840-f2ea-3490-d59d3f6bc720.htm">SegmentReader Class</a></div><div class="seeAlsoStyle"><a href="4d52bcdb-050f-b66e-6d74-d7169ebc88b0.htm">Lucene.Net.Index Namespace</a></div></div></div><div id="footer"><div class="footerLine"><img width="100%" height="3px" src="../icons/footer.gif" alt="Footer image" title="Footer image" /></div><A NAME="feedback"></A><span id="fb" class="feedbackcss"></span></div></div></body></html>