blob: 23b1eaf94aae9645f763f5aa41f34a1c5526663e [file] [log] [blame]
<!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-beta00013 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class DirectoryTaxonomyWriter
| Apache Lucene.NET 4.8.0-beta00013 Documentation ">
<meta name="generator" content="docfx 2.56.2.0">
<link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="facet/toc.html">
<meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<span id="forkongithub"><a href="https://github.com/apache/lucenenet" target="_blank">Fork me on GitHub</a></span>
<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="/">
<img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/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">
<ul class="level0 breadcrumb">
<li>
<a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a>
<span id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</span>
</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 <span class="xref">Lucene.Net.Store.Directory</span> 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 <span class="xref">Lucene.Net.Store.Directory</span>,
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
<span class="xref">Lucene.Net.Index.IndexWriter</span> 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>
<div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div><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><span class="xref">Lucene.Net.Index.ITwoPhaseCommit</span></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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_Lucene_Net_Store_Directory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.%23ctor(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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L350">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_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.#ctor(Lucene.Net.Store.Directory)">DirectoryTaxonomyWriter(Directory)</h4>
<div class="markdown level1 summary"><p>Create this with <a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Index.OpenMode.html#Lucene_Net_Index_OpenMode_CREATE_OR_APPEND">CREATE_OR_APPEND</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)</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">Lucene.Net.Store.Directory</span></td>
<td><span class="parametername">directory</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter__ctor_Lucene_Net_Store_Directory_Lucene_Net_Index_OpenMode_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L328">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)</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">Lucene.Net.Store.Directory</span></td>
<td><span class="parametername">directory</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">Lucene.Net.Index.OpenMode</span></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-beta00013/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&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L183">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><span class="xref">Lucene.Net.Store.Directory</span></td>
<td><span class="parametername">directory</span></td>
<td><p>The <span class="xref">Lucene.Net.Store.Directory</span> 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><span class="xref">Lucene.Net.Index.OpenMode</span></td>
<td><span class="parametername">openMode</span></td>
<td><p>Specifies how to open a taxonomy for writing: <a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Index.CorruptIndexException.html">CorruptIndexException</a></td>
<td><p>if the taxonomy is corrupted. </p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_INDEX_EPOCH.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/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="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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 = &quot;index.epoch&quot;</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CommitData.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L727">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&lt;string, string&gt; 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>&lt;<span class="xref">System.String</span>, <span class="xref">System.String</span>&gt;</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Count.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L750">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Directory.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1172">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 <span class="xref">Lucene.Net.Store.Directory</span> 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><span class="xref">Lucene.Net.Store.Directory</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_TaxonomyEpoch.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1191">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>
<div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div><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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddCategory_Lucene_Net_Facet_Taxonomy_FacetLabel_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L483">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_AddTaxonomy_Lucene_Net_Store_Directory_Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_IOrdinalMap_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L920">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><span class="xref">Lucene.Net.Store.Directory</span></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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Commit.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L689">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_CreateIndexWriterConfig_Lucene_Net_Index_OpenMode_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L292">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 <span class="xref">Lucene.Net.Index.IndexWriterConfig</span> that would be used for opening the internal index writer.
<p>
Extensions can configure the <span class="xref">Lucene.Net.Index.IndexWriter</span> as they see fit,
including setting a <a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Index.MergeScheduler.html">MergeScheduler</a>, or
<a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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><span class="xref">Lucene.Net.Index.OpenMode</span></td>
<td><span class="parametername">openMode</span></td>
<td><p>see <span class="xref">Lucene.Net.Index.OpenMode</span> </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><span class="xref">Lucene.Net.Index.IndexWriterConfig</span></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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_DefaultTaxonomyWriterCache.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L342">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Dispose.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L357">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 <span class="xref">Lucene.Net.Index.IndexWriter</span>,
which commits whatever changes made to it to the underlying
<span class="xref">Lucene.Net.Store.Directory</span>.</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Dispose(System.Boolean)%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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L372">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_System_Boolean_" data-uid="Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.Dispose(System.Boolean)">Dispose(Boolean)</h4>
<div class="markdown level1 summary"><p>A hook for extending classes to close additional resources that were used.
The default implementation closes the <span class="xref">Lucene.Net.Index.IndexReader</span> 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.Dispose(disposing)</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 Dispose(bool disposing)</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.Boolean</span></td>
<td><span class="parametername">disposing</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_EnsureOpen.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L553">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&apos;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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_FindCategory_Lucene_Net_Facet_Taxonomy_FacetLabel_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L412">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&apos;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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_GetParent_System_Int32_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L898">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_OpenIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L273">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 <span class="xref">Lucene.Net.Index.IndexWriter</span> 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><span class="xref">Lucene.Net.Store.Directory</span></td>
<td><span class="parametername">directory</span></td>
<td><p>the <span class="xref">Lucene.Net.Store.Directory</span> on top of which an <span class="xref">Lucene.Net.Index.IndexWriter</span>
should be opened. </p>
</td>
</tr>
<tr>
<td><span class="xref">Lucene.Net.Index.IndexWriterConfig</span></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><span class="xref">Lucene.Net.Index.IndexWriter</span></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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_PrepareCommit.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L734">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="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_ReplaceTaxonomy_Lucene_Net_Store_Directory_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1144">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="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/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><span class="xref">Lucene.Net.Store.Directory</span></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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Rollback.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L1122">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCacheMissesUntilFill_System_Int32_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L779">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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_SetCommitData_System_Collections_Generic_IDictionary_System_String_System_String__.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L722">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&lt;String, String&gt;)</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&lt;string, string&gt; 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>&lt;<span class="xref">System.String</span>, <span class="xref">System.String</span>&gt;</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter_Unlock_Lucene_Net_Store_Directory_.md&amp;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/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs/#L150">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 <span class="xref">Lucene.Net.Store.Directory</span> uses a
<a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Store.NativeFSLockFactory.html">NativeFSLockFactory</a> instead of the default
<a class="xref" href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Store.SimpleFSLockFactory.html">SimpleFSLockFactory</a>. When the &quot;native&quot; 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><span class="xref">Lucene.Net.Store.Directory</span></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>
<span class="xref">Lucene.Net.Index.ITwoPhaseCommit</span>
</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-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Facet_Taxonomy_Directory_DirectoryTaxonomyWriter.md&amp;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/apache/lucenenet/blob/fix/apidocs-layout/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 The Apache Software Foundation, Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache License, Version 2.0</a><br> <small>Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. <br>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</small>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script>
</body>
</html>