blob: be88c0da84a30f00777cb1237e2fe578da89227e [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 MockAnalyzer
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class MockAnalyzer
| Apache Lucene.NET 4.8.0-beta00010 Documentation ">
<meta name="generator" content="docfx 2.56.0.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="test-framework/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">
<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.Analysis.MockAnalyzer">
<h1 id="Lucene_Net_Analysis_MockAnalyzer" data-uid="Lucene.Net.Analysis.MockAnalyzer" class="text-break">Class MockAnalyzer
</h1>
<div class="markdown level0 summary"><p>Analyzer for testing.
<p>
This analyzer is a replacement for Whitespace/Simple/KeywordAnalyzers
for unit tests. If you are testing a custom component such as a queryparser
or analyzer-wrapper that consumes analysis streams, its a great idea to test
it with this analyzer instead. MockAnalyzer has the following behavior:
<ul><li>
By default, the assertions in <a class="xref" href="Lucene.Net.Analysis.MockTokenizer.html">MockTokenizer</a> are turned on for extra
checks that the consumer is consuming properly. These checks can be disabled
with <a class="xref" href="Lucene.Net.Analysis.MockAnalyzer.html#Lucene_Net_Analysis_MockAnalyzer_EnableChecks">EnableChecks</a>.
</li><li>
Payload data is randomly injected into the stream for more thorough testing
of payloads.
</li></ul></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">Lucene.Net.Analysis.Analyzer</span></div>
<div class="level2"><span class="xref">MockAnalyzer</span></div>
</div>
<div classs="implements">
<h5>Implements</h5>
<div><span class="xref">System.IDisposable</span></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.NewAnonymous(System.Func&lt;System.String, System.IO.TextReader, Lucene.Net.Analysis.TokenStreamComponents&gt;)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.NewAnonymous(System.Func&lt;System.String, System.IO.TextReader, Lucene.Net.Analysis.TokenStreamComponents&gt;, Lucene.Net.Analysis.ReuseStrategy)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.NewAnonymous(System.Func&lt;System.String, System.IO.TextReader, Lucene.Net.Analysis.TokenStreamComponents&gt;, System.Func&lt;System.String, System.IO.TextReader, System.IO.TextReader&gt;)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.NewAnonymous(System.Func&lt;System.String, System.IO.TextReader, Lucene.Net.Analysis.TokenStreamComponents&gt;, System.Func&lt;System.String, System.IO.TextReader, System.IO.TextReader&gt;, Lucene.Net.Analysis.ReuseStrategy)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.GetTokenStream(System.String, System.IO.TextReader)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.GetTokenStream(System.String, System.String)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.InitReader(System.String, System.IO.TextReader)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.Strategy</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.Dispose()</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.Dispose(System.Boolean)</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.GLOBAL_REUSE_STRATEGY</span>
</div>
<div>
<span class="xref">Lucene.Net.Analysis.Analyzer.PER_FIELD_REUSE_STRATEGY</span>
</div>
<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.Analysis.html">Lucene.Net.Analysis</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.TestFramework.dll</h6>
<h5 id="Lucene_Net_Analysis_MockAnalyzer_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public sealed class MockAnalyzer : Analyzer, IDisposable</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer__ctor_System_Random_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.%23ctor(System.Random)%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L93">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer__ctor_" data-uid="Lucene.Net.Analysis.MockAnalyzer.#ctor*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer__ctor_System_Random_" data-uid="Lucene.Net.Analysis.MockAnalyzer.#ctor(System.Random)">MockAnalyzer(Random)</h4>
<div class="markdown level1 summary"><p>Create a Whitespace-lowercasing analyzer with no stopwords removal.
<p>
Calls <code>MockAnalyzer(random, MockTokenizer.WHITESPACE, true, MockTokenFilter.EMPTY_STOPSET, false)</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MockAnalyzer(Random random)</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.Random</span></td>
<td><span class="parametername">random</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer__ctor_System_Random_Lucene_Net_Util_Automaton_CharacterRunAutomaton_System_Boolean_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.%23ctor(System.Random%2CLucene.Net.Util.Automaton.CharacterRunAutomaton%2CSystem.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L83">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer__ctor_" data-uid="Lucene.Net.Analysis.MockAnalyzer.#ctor*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer__ctor_System_Random_Lucene_Net_Util_Automaton_CharacterRunAutomaton_System_Boolean_" data-uid="Lucene.Net.Analysis.MockAnalyzer.#ctor(System.Random,Lucene.Net.Util.Automaton.CharacterRunAutomaton,System.Boolean)">MockAnalyzer(Random, CharacterRunAutomaton, Boolean)</h4>
<div class="markdown level1 summary"><p>Calls <code>MockAnalyzer(random, runAutomaton, lowerCase, MockTokenFilter.EMPTY_STOPSET, false)</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MockAnalyzer(Random random, CharacterRunAutomaton runAutomaton, bool lowerCase)</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.Random</span></td>
<td><span class="parametername">random</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">Lucene.Net.Util.Automaton.CharacterRunAutomaton</span></td>
<td><span class="parametername">runAutomaton</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">lowerCase</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer__ctor_System_Random_Lucene_Net_Util_Automaton_CharacterRunAutomaton_System_Boolean_Lucene_Net_Util_Automaton_CharacterRunAutomaton_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.%23ctor(System.Random%2CLucene.Net.Util.Automaton.CharacterRunAutomaton%2CSystem.Boolean%2CLucene.Net.Util.Automaton.CharacterRunAutomaton)%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L70">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer__ctor_" data-uid="Lucene.Net.Analysis.MockAnalyzer.#ctor*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer__ctor_System_Random_Lucene_Net_Util_Automaton_CharacterRunAutomaton_System_Boolean_Lucene_Net_Util_Automaton_CharacterRunAutomaton_" data-uid="Lucene.Net.Analysis.MockAnalyzer.#ctor(System.Random,Lucene.Net.Util.Automaton.CharacterRunAutomaton,System.Boolean,Lucene.Net.Util.Automaton.CharacterRunAutomaton)">MockAnalyzer(Random, CharacterRunAutomaton, Boolean, CharacterRunAutomaton)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="Lucene.Net.Analysis.MockAnalyzer.html">MockAnalyzer</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MockAnalyzer(Random random, CharacterRunAutomaton runAutomaton, bool lowerCase, CharacterRunAutomaton filter)</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.Random</span></td>
<td><span class="parametername">random</span></td>
<td><p>Random for payloads behavior </p>
</td>
</tr>
<tr>
<td><span class="xref">Lucene.Net.Util.Automaton.CharacterRunAutomaton</span></td>
<td><span class="parametername">runAutomaton</span></td>
<td><p>DFA describing how tokenization should happen (e.g. [a-zA-Z]+) </p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">lowerCase</span></td>
<td><p>true if the tokenizer should lowercase terms </p>
</td>
</tr>
<tr>
<td><span class="xref">Lucene.Net.Util.Automaton.CharacterRunAutomaton</span></td>
<td><span class="parametername">filter</span></td>
<td><p>DFA describing how terms should be filtered (set of stopwords, etc) </p>
</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_EnableChecks.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.EnableChecks%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L190">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_EnableChecks_" data-uid="Lucene.Net.Analysis.MockAnalyzer.EnableChecks*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_EnableChecks" data-uid="Lucene.Net.Analysis.MockAnalyzer.EnableChecks">EnableChecks</h4>
<div class="markdown level1 summary"><p>Toggle consumer workflow checking: if your test consumes tokenstreams normally you
should leave this enabled.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool EnableChecks { get; set; }</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.Boolean</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_MaxTokenLength.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.MaxTokenLength%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L199">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_MaxTokenLength_" data-uid="Lucene.Net.Analysis.MockAnalyzer.MaxTokenLength*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_MaxTokenLength" data-uid="Lucene.Net.Analysis.MockAnalyzer.MaxTokenLength">MaxTokenLength</h4>
<div class="markdown level1 summary"><p>Toggle maxTokenLength for <a class="xref" href="Lucene.Net.Analysis.MockTokenizer.html">MockTokenizer</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int MaxTokenLength { get; set; }</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>
<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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_CreateComponents_System_String_System_IO_TextReader_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.CreateComponents(System.String%2CSystem.IO.TextReader)%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L98">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_CreateComponents_" data-uid="Lucene.Net.Analysis.MockAnalyzer.CreateComponents*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_CreateComponents_System_String_System_IO_TextReader_" data-uid="Lucene.Net.Analysis.MockAnalyzer.CreateComponents(System.String,System.IO.TextReader)">CreateComponents(String, TextReader)</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">protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)</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.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.IO.TextReader</span></td>
<td><span class="parametername">reader</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">Lucene.Net.Analysis.TokenStreamComponents</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">Lucene.Net.Analysis.Analyzer.CreateComponents(System.String, System.IO.TextReader)</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_GetOffsetGap_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.GetOffsetGap(System.String)%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L181">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_GetOffsetGap_" data-uid="Lucene.Net.Analysis.MockAnalyzer.GetOffsetGap*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_GetOffsetGap_System_String_" data-uid="Lucene.Net.Analysis.MockAnalyzer.GetOffsetGap(System.String)">GetOffsetGap(String)</h4>
<div class="markdown level1 summary"><p>Get the offset gap between tokens in fields if several fields with the same name were added. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override int GetOffsetGap(string fieldName)</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.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>Currently not used, the same offset gap is returned for each field. </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">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">Lucene.Net.Analysis.Analyzer.GetOffsetGap(System.String)</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_GetPositionIncrementGap_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.GetPositionIncrementGap(System.String)%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L166">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_GetPositionIncrementGap_" data-uid="Lucene.Net.Analysis.MockAnalyzer.GetPositionIncrementGap*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_GetPositionIncrementGap_System_String_" data-uid="Lucene.Net.Analysis.MockAnalyzer.GetPositionIncrementGap(System.String)">GetPositionIncrementGap(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 override int GetPositionIncrementGap(string fieldName)</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.String</span></td>
<td><span class="parametername">fieldName</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>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">Lucene.Net.Analysis.Analyzer.GetPositionIncrementGap(System.String)</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_SetOffsetGap_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.SetOffsetGap(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L173">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_SetOffsetGap_" data-uid="Lucene.Net.Analysis.MockAnalyzer.SetOffsetGap*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_SetOffsetGap_System_Int32_" data-uid="Lucene.Net.Analysis.MockAnalyzer.SetOffsetGap(System.Int32)">SetOffsetGap(Int32)</h4>
<div class="markdown level1 summary"><p>Sets an offset gap which will then be added to the offset when several fields with the same name are indexed </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetOffsetGap(int offsetGap)</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">offsetGap</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer_SetPositionIncrementGap_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer.SetPositionIncrementGap(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L161">View Source</a>
</span>
<a id="Lucene_Net_Analysis_MockAnalyzer_SetPositionIncrementGap_" data-uid="Lucene.Net.Analysis.MockAnalyzer.SetPositionIncrementGap*"></a>
<h4 id="Lucene_Net_Analysis_MockAnalyzer_SetPositionIncrementGap_System_Int32_" data-uid="Lucene.Net.Analysis.MockAnalyzer.SetPositionIncrementGap(System.Int32)">SetPositionIncrementGap(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 void SetPositionIncrementGap(int positionIncrementGap)</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">positionIncrementGap</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="implements">Implements</h3>
<div>
<span class="xref">System.IDisposable</span>
</div>
<h3 id="seealso">See Also</h3>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Analysis.MockTokenizer.html">MockTokenizer</a></div>
</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Analysis_MockAnalyzer.md&amp;value=---%0Auid%3A%20Lucene.Net.Analysis.MockAnalyzer%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.TestFramework/Analysis/MockAnalyzer.cs/#L51" 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="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>