| <!DOCTYPE html> |
| <!--[if IE]><![endif]--> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <title>Class DirectoryTaxonomyWriter |
| | Apache Lucene.NET 4.8.0 Documentation </title> |
| <meta name="viewport" content="width=device-width"> |
| <meta name="title" content="Class DirectoryTaxonomyWriter |
| | Apache Lucene.NET 4.8.0 Documentation "> |
| <meta name="generator" content="docfx 2.47.0.0"> |
| |
| <link rel="shortcut icon" href="../../logo/favicon.ico"> |
| <link rel="stylesheet" href="../../styles/docfx.vendor.css"> |
| <link rel="stylesheet" href="../../styles/docfx.css"> |
| <link rel="stylesheet" href="../../styles/main.css"> |
| <meta property="docfx:navrel" content="../../toc.html"> |
| <meta property="docfx:tocrel" content="../toc.html"> |
| |
| <meta property="docfx:rel" content="../../"> |
| |
| </head> |
| <body data-spy="scroll" data-target="#affix" data-offset="120"> |
| <div id="wrapper"> |
| <header> |
| |
| <nav id="autocollapse" class="navbar ng-scope" role="navigation"> |
| <div class="container"> |
| <div class="navbar-header"> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| |
| <a class="navbar-brand" href="../../index.html"> |
| <img id="logo" class="svg" src="../../logo/lucene-net-color.png" alt=""> |
| </a> |
| </div> |
| <div class="collapse navbar-collapse" id="navbar"> |
| <form class="navbar-form navbar-right" role="search" id="search"> |
| <div class="form-group"> |
| <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> |
| </div> |
| </form> |
| </div> |
| </div> |
| </nav> |
| |
| <div class="subnav navbar navbar-default"> |
| <div class="container hide-when-search" id="breadcrumb"> |
| <ul class="breadcrumb"> |
| <li></li> |
| </ul> |
| </div> |
| </div> |
| </header> |
| <div class="container body-content"> |
| |
| <div id="search-results"> |
| <div class="search-list"></div> |
| <div class="sr-items"> |
| <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> |
| </div> |
| <ul id="pagination"></ul> |
| </div> |
| </div> |
| <div role="main" class="container body-content hide-when-search"> |
| |
| <div class="sidenav hide-when-search"> |
| <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> |
| <div class="sidetoggle collapse" id="sidetoggle"> |
| <div id="sidetoc"></div> |
| </div> |
| </div> |
| <div class="article row grid-right"> |
| <div class="col-md-10"> |
| <article class="content wrap" id="_content" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter"> |
| |
| |
| <h1 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter" class="text-break">Class DirectoryTaxonomyWriter |
| </h1> |
| <div class="markdown level0 summary"><p><a class="xref" href="Lucene.Net.Facet.Taxonomy.ITaxonomyWriter.html">ITaxonomyWriter</a> which uses a <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a> to store the taxonomy |
| information on disk, and keeps an additional in-memory cache of some or all |
| categories. |
| <p> |
| In addition to the permanently-stored information in the <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a>, |
| efficiency dictates that we also keep an in-memory cache of <strong>recently |
| seen</strong> or <strong>all</strong> categories, so that we do not need to go back to disk |
| for every category addition to see which ordinal this category already has, |
| if any. A <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache.html">ITaxonomyWriterCache</a> object determines the specific caching |
| algorithm used. |
| </p> |
| <p> |
| This class offers some hooks for extending classes to control the |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html">IndexWriter</a> instance that is used. See <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig_">OpenIndexWriter(Directory, IndexWriterConfig)</a>.</p> |
| <p>@lucene.experimental |
| </p></p> |
| </div> |
| <div class="markdown level0 conceptual"></div> |
| <div class="inheritance"> |
| <h5>Inheritance</h5> |
| <div class="level0"><span class="xref">System.Object</span></div> |
| <div class="level1"><span class="xref">DirectoryTaxonomyWriter</span></div> |
| </div> |
| <div classs="implements"> |
| <h5>Implements</h5> |
| <div><a class="xref" href="Lucene.Net.Facet.Taxonomy.ITaxonomyWriter.html">ITaxonomyWriter</a></div> |
| <div><span class="xref">System.IDisposable</span></div> |
| <div><a class="xref" href="../Lucene.Net/Lucene.Net.Index.ITwoPhaseCommit.html">ITwoPhaseCommit</a></div> |
| </div> |
| <div class="inheritedMembers"> |
| <h5>Inherited Members</h5> |
| <div> |
| <span class="xref">System.Object.Equals(System.Object)</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.Equals(System.Object, System.Object)</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.GetHashCode()</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.GetType()</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.MemberwiseClone()</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.ToString()</span> |
| </div> |
| </div> |
| <h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.html">Lucene.Net.Facet.Taxonomy.Directory</a></h6> |
| <h6><strong>Assembly</strong>: Lucene.Net.Facet.dll</h6> |
| <h5 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_syntax">Syntax</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public class DirectoryTaxonomyWriter : ITaxonomyWriter, IDisposable, ITwoPhaseCommit</code></pre> |
| </div> |
| <h3 id="constructors">Constructors |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_Lucene_Net_Store_Directory_Lucene_Net_Index_OpenMode_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.%23ctor(Lucene.Net.Store.Directory%2CLucene.Net.Index.OpenMode)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L326">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.#ctor*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_Lucene_Net_Store_Directory_Lucene_Net_Index_OpenMode_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.OpenMode)">DirectoryTaxonomyWriter(Directory, OpenMode)</h4> |
| <div class="markdown level1 summary"><p>Creates a new instance with a default cache as defined by |
| <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_DefaultTaxonomyWriterCache">DefaultTaxonomyWriterCache()</a>.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public DirectoryTaxonomyWriter(Directory directory, OpenMode openMode = OpenMode.CREATE_OR_APPEND)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td><span class="parametername">directory</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html">OpenMode</a></td> |
| <td><span class="parametername">openMode</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_Lucene_Net_Store_Directory_Lucene_Net_Index_OpenMode_Lucene_Net_Facet_Taxonomy_WriterCache_ITaxonomyWriterCache_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.%23ctor(Lucene.Net.Store.Directory%2CLucene.Net.Index.OpenMode%2CLucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L181">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.#ctor*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_Lucene_Net_Store_Directory_Lucene_Net_Index_OpenMode_Lucene_Net_Facet_Taxonomy_WriterCache_ITaxonomyWriterCache_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.OpenMode,Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache)">DirectoryTaxonomyWriter(Directory, OpenMode, ITaxonomyWriterCache)</h4> |
| <div class="markdown level1 summary"><p>Construct a Taxonomy writer.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public DirectoryTaxonomyWriter(Directory directory, OpenMode openMode, ITaxonomyWriterCache cache)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td><span class="parametername">directory</span></td> |
| <td><p>The <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a> in which to store the taxonomy. Note that |
| the taxonomy is written directly to that directory (not to a |
| subdirectory of it). </p> |
| </td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html">OpenMode</a></td> |
| <td><span class="parametername">openMode</span></td> |
| <td><p>Specifies how to open a taxonomy for writing: <a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html#Lucene_Net_Index_OpenMode_APPEND">APPEND</a> |
| means open an existing index for append (failing if the index does |
| not yet exist). <a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html#Lucene_Net_Index_OpenMode_CREATE">CREATE</a> means create a new index (first |
| deleting the old one if it already existed). |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html#Lucene_Net_Index_OpenMode_CREATE_OR_APPEND">CREATE_OR_APPEND</a> appends to an existing index if there |
| is one, otherwise it creates a new index. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache.html">ITaxonomyWriterCache</a></td> |
| <td><span class="parametername">cache</span></td> |
| <td><p>A <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache.html">ITaxonomyWriterCache</a> implementation which determines |
| the in-memory caching policy. See for example |
| <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.LruTaxonomyWriterCache.html">LruTaxonomyWriterCache</a> and <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.Cl2oTaxonomyWriterCache.html">Cl2oTaxonomyWriterCache</a>. |
| If null or missing, <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_DefaultTaxonomyWriterCache">DefaultTaxonomyWriterCache()</a> is used. </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="exceptions">Exceptions</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Condition</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.CorruptIndexException.html">CorruptIndexException</a></td> |
| <td><p>if the taxonomy is corrupted. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.LockObtainFailedException.html">LockObtainFailedException</a></td> |
| <td><p>if the taxonomy is locked by another writer. If it is known |
| that no other concurrent writer is active, the lock might |
| have been left around by an old dead process, and should be |
| removed using <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Unlock_Lucene_Net_Store_Directory_">Unlock(Directory)</a>. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.IO.IOException</span></td> |
| <td><p>if another error occurred. </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="fields">Fields |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_INDEX_EPOCH.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.INDEX_EPOCH%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L90">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_INDEX_EPOCH" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.INDEX_EPOCH">INDEX_EPOCH</h4> |
| <div class="markdown level1 summary"><p>Property name of user commit data that contains the index epoch. The epoch |
| changes whenever the taxonomy is recreated (i.e. opened with |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html#Lucene_Net_Index_OpenMode_CREATE">CREATE</a>. |
| <p> |
| Applications should not use this property in their commit data because it |
| will be overridden by this taxonomy writer. |
| </p></p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public const string INDEX_EPOCH = "index.epoch"</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.String</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="properties">Properties |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CommitData.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CommitData%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L708">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CommitData_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CommitData*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CommitData" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CommitData">CommitData</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual IDictionary<string, string> CommitData { get; }</code></pre> |
| </div> |
| <h5 class="propertyValue">Property Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IDictionary</span><<span class="xref">System.String</span>, <span class="xref">System.String</span>></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Count.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Count%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L738">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Count_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Count*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Count" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Count">Count</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual int Count { get; }</code></pre> |
| </div> |
| <h5 class="propertyValue">Property Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Directory.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Directory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1151">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Directory_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Directory*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Directory" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Directory">Directory</h4> |
| <div class="markdown level1 summary"><p>Returns the <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a> of this taxonomy writer.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual Directory Directory { get; }</code></pre> |
| </div> |
| <h5 class="propertyValue">Property Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_TaxonomyEpoch.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.TaxonomyEpoch%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1182">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_TaxonomyEpoch_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.TaxonomyEpoch*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_TaxonomyEpoch" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.TaxonomyEpoch">TaxonomyEpoch</h4> |
| <div class="markdown level1 summary"><p>Expert: returns current index epoch, if this is a |
| near-real-time reader. Used by |
| <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader.html">DirectoryTaxonomyReader</a> to support NRT. </p> |
| <p>@lucene.internal </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public long TaxonomyEpoch { get; }</code></pre> |
| </div> |
| <h5 class="propertyValue">Property Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int64</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="methods">Methods |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddCategory_Lucene_Net_Facet_Taxonomy_FacetLabel_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.AddCategory(Lucene.Net.Facet.Taxonomy.FacetLabel)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L471">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddCategory_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.AddCategory*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddCategory_Lucene_Net_Facet_Taxonomy_FacetLabel_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.AddCategory(Lucene.Net.Facet.Taxonomy.FacetLabel)">AddCategory(FacetLabel)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual int AddCategory(FacetLabel categoryPath)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Facet.Taxonomy.FacetLabel.html">FacetLabel</a></td> |
| <td><span class="parametername">categoryPath</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddTaxonomy_Lucene_Net_Store_Directory_Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_IOrdinalMap_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.AddTaxonomy(Lucene.Net.Store.Directory%2CLucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.IOrdinalMap)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L906">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddTaxonomy_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.AddTaxonomy*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddTaxonomy_Lucene_Net_Store_Directory_Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_IOrdinalMap_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.AddTaxonomy(Lucene.Net.Store.Directory,Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.IOrdinalMap)">AddTaxonomy(Directory, DirectoryTaxonomyWriter.IOrdinalMap)</h4> |
| <div class="markdown level1 summary"><p>Takes the categories from the given taxonomy directory, and adds the |
| missing ones to this taxonomy. Additionally, it fills the given |
| <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.IOrdinalMap.html">DirectoryTaxonomyWriter.IOrdinalMap</a> with a mapping from the original ordinal to the new |
| ordinal.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void AddTaxonomy(Directory taxoDir, DirectoryTaxonomyWriter.IOrdinalMap map)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td><span class="parametername">taxoDir</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.IOrdinalMap.html">DirectoryTaxonomyWriter.IOrdinalMap</a></td> |
| <td><span class="parametername">map</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CloseResources.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CloseResources%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L378">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CloseResources_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CloseResources*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CloseResources" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CloseResources">CloseResources()</h4> |
| <div class="markdown level1 summary"><p>A hook for extending classes to close additional resources that were used. |
| The default implementation closes the <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexReader.html">IndexReader</a> as well as the |
| <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache.html">ITaxonomyWriterCache</a> instances that were used. |
| <p> |
| <strong>NOTE:</strong> if you override this method, you should include a |
| <code>base.CloseResources()</code> call in your implementation. |
| </p></p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected virtual void CloseResources()</code></pre> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Commit.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Commit%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L673">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Commit_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Commit*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Commit" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Commit">Commit()</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void Commit()</code></pre> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_Lucene_Net_Index_OpenMode_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CreateIndexWriterConfig(Lucene.Net.Index.OpenMode)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L290">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CreateIndexWriterConfig*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_Lucene_Net_Index_OpenMode_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.CreateIndexWriterConfig(Lucene.Net.Index.OpenMode)">CreateIndexWriterConfig(OpenMode)</h4> |
| <div class="markdown level1 summary"><p>Create the <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriterConfig.html">IndexWriterConfig</a> that would be used for opening the internal index writer. |
| <p> |
| Extensions can configure the <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html">IndexWriter</a> as they see fit, |
| including setting a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.MergeScheduler.html">MergeScheduler</a>, or |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a>, different RAM size |
| etc. |
| <p> |
| <strong>NOTE:</strong> internal docids of the configured index must not be altered. |
| For that, categories are never deleted from the taxonomy index. |
| In addition, merge policy in effect must not merge none adjacent segments.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected virtual IndexWriterConfig CreateIndexWriterConfig(OpenMode openMode)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html">OpenMode</a></td> |
| <td><span class="parametername">openMode</span></td> |
| <td><p>see <a class="xref" href="../Lucene.Net/Lucene.Net.Index.OpenMode.html">OpenMode</a> </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriterConfig.html">IndexWriterConfig</a></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_Lucene_Net_Index_OpenMode__seealso">See Also</h5> |
| <div class="seealso"> |
| <div><a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig_">OpenIndexWriter(Directory, IndexWriterConfig)</a></div> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_DefaultTaxonomyWriterCache.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.DefaultTaxonomyWriterCache%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L340">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_DefaultTaxonomyWriterCache_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.DefaultTaxonomyWriterCache*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_DefaultTaxonomyWriterCache" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.DefaultTaxonomyWriterCache">DefaultTaxonomyWriterCache()</h4> |
| <div class="markdown level1 summary"><p>Defines the default <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache.html">ITaxonomyWriterCache</a> to use in constructors |
| which do not specify one. |
| <p><br>The current default is <a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.Cl2oTaxonomyWriterCache.html">Cl2oTaxonomyWriterCache</a> constructed |
| with the parameters (1024, 0.15f, 3), i.e., the entire taxonomy is |
| cached in memory while building it. |
| </p></p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static ITaxonomyWriterCache DefaultTaxonomyWriterCache()</code></pre> |
| </div> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Facet.Taxonomy.WriterCache.ITaxonomyWriterCache.html">ITaxonomyWriterCache</a></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Dispose.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Dispose%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L350">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Dispose_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Dispose*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Dispose" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Dispose">Dispose()</h4> |
| <div class="markdown level1 summary"><p>Frees used resources as well as closes the underlying <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html">IndexWriter</a>, |
| which commits whatever changes made to it to the underlying |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a>.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public void Dispose()</code></pre> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_EnsureOpen.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.EnsureOpen%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L541">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_EnsureOpen_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.EnsureOpen*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_EnsureOpen" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.EnsureOpen">EnsureOpen()</h4> |
| <div class="markdown level1 summary"><p>Verifies that this instance wasn't closed, or throws |
| <span class="xref">System.ObjectDisposedException</span> if it is.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected void EnsureOpen()</code></pre> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_FindCategory_Lucene_Net_Facet_Taxonomy_FacetLabel_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.FindCategory(Lucene.Net.Facet.Taxonomy.FacetLabel)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L400">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_FindCategory_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.FindCategory*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_FindCategory_Lucene_Net_Facet_Taxonomy_FacetLabel_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.FindCategory(Lucene.Net.Facet.Taxonomy.FacetLabel)">FindCategory(FacetLabel)</h4> |
| <div class="markdown level1 summary"><p>Look up the given category in the cache and/or the on-disk storage, |
| returning the category's ordinal, or a negative number in case the |
| category does not yet exist in the taxonomy.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected virtual int FindCategory(FacetLabel categoryPath)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Facet.Taxonomy.FacetLabel.html">FacetLabel</a></td> |
| <td><span class="parametername">categoryPath</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_GetParent_System_Int32_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.GetParent(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L884">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_GetParent_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.GetParent*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_GetParent_System_Int32_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.GetParent(System.Int32)">GetParent(Int32)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual int GetParent(int ordinal)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">ordinal</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.OpenIndexWriter(Lucene.Net.Store.Directory%2CLucene.Net.Index.IndexWriterConfig)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L271">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.OpenIndexWriter*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.OpenIndexWriter(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexWriterConfig)">OpenIndexWriter(Directory, IndexWriterConfig)</h4> |
| <div class="markdown level1 summary"><p>Open internal index writer, which contains the taxonomy data. |
| <p> |
| Extensions may provide their own <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html">IndexWriter</a> implementation or instance. |
| <p> |
| <strong>NOTE:</strong> the instance this method returns will be disposed upon calling |
| to <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Dispose">Dispose()</a>. |
| <p> |
| <strong>NOTE:</strong> the merge policy in effect must not merge none adjacent segments. See |
| comment in <a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_Lucene_Net_Index_OpenMode_">CreateIndexWriterConfig(OpenMode)</a> for the logic behind this.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected virtual IndexWriter OpenIndexWriter(Directory directory, IndexWriterConfig config)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td><span class="parametername">directory</span></td> |
| <td><p>the <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a> on top of which an <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html">IndexWriter</a> |
| should be opened. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriterConfig.html">IndexWriterConfig</a></td> |
| <td><span class="parametername">config</span></td> |
| <td><p>configuration for the internal index writer. </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html">IndexWriter</a></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig__seealso">See Also</h5> |
| <div class="seealso"> |
| <div><a class="xref" href="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.html#Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_Lucene_Net_Index_OpenMode_">CreateIndexWriterConfig(OpenMode)</a></div> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_PrepareCommit.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.PrepareCommit%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L721">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_PrepareCommit_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.PrepareCommit*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_PrepareCommit" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.PrepareCommit">PrepareCommit()</h4> |
| <div class="markdown level1 summary"><p>prepare most of the work needed for a two-phase commit. |
| See <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html#Lucene_Net_Index_IndexWriter_PrepareCommit">PrepareCommit()</a>.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void PrepareCommit()</code></pre> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_ReplaceTaxonomy_Lucene_Net_Store_Directory_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.ReplaceTaxonomy(Lucene.Net.Store.Directory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1123">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_ReplaceTaxonomy_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.ReplaceTaxonomy*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_ReplaceTaxonomy_Lucene_Net_Store_Directory_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.ReplaceTaxonomy(Lucene.Net.Store.Directory)">ReplaceTaxonomy(Directory)</h4> |
| <div class="markdown level1 summary"><p>Replaces the current taxonomy with the given one. This method should |
| generally be called in conjunction with |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Index.IndexWriter.html#Lucene_Net_Index_IndexWriter_AddIndexes_Lucene_Net_Store_Directory___">AddIndexes(Directory[])</a> to replace both the taxonomy |
| as well as the search index content.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void ReplaceTaxonomy(Directory taxoDir)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td><span class="parametername">taxoDir</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Rollback.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Rollback%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1107">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Rollback_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Rollback*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Rollback" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Rollback">Rollback()</h4> |
| <div class="markdown level1 summary"><p>Rollback changes to the taxonomy writer and closes the instance. Following |
| this method the instance becomes unusable (calling any of its API methods |
| will yield an <span class="xref">System.ObjectDisposedException</span>).</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void Rollback()</code></pre> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCacheMissesUntilFill_System_Int32_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.SetCacheMissesUntilFill(System.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L767">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCacheMissesUntilFill_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.SetCacheMissesUntilFill*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCacheMissesUntilFill_System_Int32_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.SetCacheMissesUntilFill(System.Int32)">SetCacheMissesUntilFill(Int32)</h4> |
| <div class="markdown level1 summary"><p>Set the number of cache misses before an attempt is made to read the entire |
| taxonomy into the in-memory cache. |
| <p> |
| This taxonomy writer holds an in-memory cache of recently seen categories |
| to speed up operation. On each cache-miss, the on-disk index needs to be |
| consulted. When an existing taxonomy is opened, a lot of slow disk reads |
| like that are needed until the cache is filled, so it is more efficient to |
| read the entire taxonomy into memory at once. We do this complete read |
| after a certain number (defined by this method) of cache misses. |
| </p> |
| <p> |
| If the number is set to <code>0</code>, the entire taxonomy is read into the |
| cache on first use, without fetching individual categories first. |
| </p> |
| <p> |
| NOTE: it is assumed that this method is called immediately after the |
| taxonomy writer has been created. |
| </p></p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void SetCacheMissesUntilFill(int i)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">i</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCommitData_System_Collections_Generic_IDictionary_System_String_System_String__.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.SetCommitData(System.Collections.Generic.IDictionary%7BSystem.String%2CSystem.String%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L703">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCommitData_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.SetCommitData*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCommitData_System_Collections_Generic_IDictionary_System_String_System_String__" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.SetCommitData(System.Collections.Generic.IDictionary{System.String,System.String})">SetCommitData(IDictionary<String, String>)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void SetCommitData(IDictionary<string, string> commitUserData)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IDictionary</span><<span class="xref">System.String</span>, <span class="xref">System.String</span>></td> |
| <td><span class="parametername">commitUserData</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Unlock_Lucene_Net_Store_Directory_.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Unlock(Lucene.Net.Store.Directory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L148">View Source</a> |
| </span> |
| <a id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Unlock_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Unlock*"></a> |
| <h4 id="Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Unlock_Lucene_Net_Store_Directory_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Unlock(Lucene.Net.Store.Directory)">Unlock(Directory)</h4> |
| <div class="markdown level1 summary"><p>Forcibly unlocks the taxonomy in the named directory. |
| <p> |
| Caution: this should only be used by failure recovery code, when it is |
| known that no other process nor thread is in fact currently accessing |
| this taxonomy. |
| <p> |
| This method is unnecessary if your <a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a> uses a |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Store.NativeFSLockFactory.html">NativeFSLockFactory</a> instead of the default |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Store.SimpleFSLockFactory.html">SimpleFSLockFactory</a>. When the "native" lock is used, a lock |
| does not stay behind forever when the process using it dies. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void Unlock(Directory directory)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="../Lucene.Net/Lucene.Net.Store.Directory.html">Directory</a></td> |
| <td><span class="parametername">directory</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="implements">Implements</h3> |
| <div> |
| <a class="xref" href="Lucene.Net.Facet.Taxonomy.ITaxonomyWriter.html">ITaxonomyWriter</a> |
| </div> |
| <div> |
| <span class="xref">System.IDisposable</span> |
| </div> |
| <div> |
| <a class="xref" href="../Lucene.Net/Lucene.Net.Index.ITwoPhaseCommit.html">ITwoPhaseCommit</a> |
| </div> |
| </article> |
| </div> |
| |
| <div class="hidden-sm col-md-2" role="complementary"> |
| <div class="sideaffix"> |
| <div class="contribution"> |
| <ul class="nav"> |
| <li> |
| <a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter.md&value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a> |
| </li> |
| <li> |
| <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L79" class="contribution-link">View Source</a> |
| </li> |
| </ul> |
| </div> |
| <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> |
| <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> |
| </nav> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <footer> |
| <div class="grad-bottom"></div> |
| <div class="footer"> |
| <div class="container"> |
| <span class="pull-right"> |
| <a href="#top">Back to top</a> |
| </span> |
| Copyright © 2020 Licensed to the Apache Software Foundation (ASF) |
| |
| </div> |
| </div> |
| </footer> |
| </div> |
| |
| <script type="text/javascript" src="../../styles/docfx.vendor.js"></script> |
| <script type="text/javascript" src="../../styles/docfx.js"></script> |
| <script type="text/javascript" src="../../styles/main.js"></script> |
| </body> |
| </html> |