blob: 0d94bfe33e25f765057e177bf83a65e5a4a235c4 [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>Namespace Lucene.Net.Index
| Apache Lucene.NET 4.8.0 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Namespace Lucene.Net.Index
| Apache Lucene.NET 4.8.0 Documentation ">
<meta name="generator" content="docfx 2.47.0.0">
<link rel="shortcut icon" href="../../logo/favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<meta property="docfx:navrel" content="../../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
<meta property="docfx:rel" content="../../">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Index">
<h1 id="Lucene_Net_Index" data-uid="Lucene.Net.Index" class="text-break">Namespace Lucene.Net.Index
</h1>
<div class="markdown level0 summary"><!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<p>Support for testing of indexes. </p>
<p> The primary classes are: * <a class="xref" href="Lucene.Net.Index.RandomIndexWriter.html">RandomIndexWriter</a>: Randomizes the indexing experience. * <a class="xref" href="Lucene.Net.Index.MockRandomMergePolicy.html">MockRandomMergePolicy</a>: MergePolicy that makes random decisions. </p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="markdown level0 remarks"></div>
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="Lucene.Net.Index.AlcoholicMergePolicy.html">AlcoholicMergePolicy</a></h4>
<section><p>
Merge policy for testing, it is like an alcoholic.
It drinks (merges) at night, and randomly decides what to drink.
During the daytime it sleeps.
</p>
<p>
If tests pass with this, then they are likely to pass with any
bizarro merge policy users might write.
</p>
<p>
It is a fine bottle of champagne (Ordered by Martijn).
</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AllDeletedFilterReader.html">AllDeletedFilterReader</a></h4>
<section><p>Filters the incoming reader and makes all documents appear deleted.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingAtomicReader.html">AssertingAtomicReader</a></h4>
<section><p>A <a class="xref" href="../Lucene.Net/Lucene.Net.Index.FilterAtomicReader.html">FilterAtomicReader</a> that can be used to apply
additional checks for tests.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingBinaryDocValues.html">AssertingBinaryDocValues</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.BinaryDocValues.html">BinaryDocValues</a> but with additional asserts </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingBits.html">AssertingBits</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Util.IBits.html">IBits</a> but with additional asserts </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingDirectoryReader.html">AssertingDirectoryReader</a></h4>
<section><p>A <a class="xref" href="../Lucene.Net/Lucene.Net.Index.DirectoryReader.html">DirectoryReader</a> that wraps all its subreaders with
<a class="xref" href="Lucene.Net.Index.AssertingAtomicReader.html">AssertingAtomicReader</a></p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingDocsEnum.html">AssertingDocsEnum</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.DocsEnum.html">DocsEnum</a> with additional checks </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingFields.html">AssertingFields</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.Fields.html">Fields</a> but with additional asserts</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingNumericDocValues.html">AssertingNumericDocValues</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.NumericDocValues.html">NumericDocValues</a> but with additional asserts </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingSortedDocValues.html">AssertingSortedDocValues</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.SortedDocValues.html">SortedDocValues</a> but with additional asserts </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingSortedSetDocValues.html">AssertingSortedSetDocValues</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.SortedSetDocValues.html">SortedSetDocValues</a> but with additional asserts </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.AssertingTerms.html">AssertingTerms</a></h4>
<section><p>Wraps a <a class="xref" href="../Lucene.Net/Lucene.Net.Index.Terms.html">Terms</a> but with additional asserts</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.BaseCompressingDocValuesFormatTestCase.html">BaseCompressingDocValuesFormatTestCase</a></h4>
<section><p>Extends <a class="xref" href="Lucene.Net.Index.BaseDocValuesFormatTestCase.html">BaseDocValuesFormatTestCase</a> to add compression checks. </p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.BaseDocValuesFormatTestCase.html">BaseDocValuesFormatTestCase</a></h4>
<section><p>Abstract class to do basic tests for a <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.DocValuesFormat.html">DocValuesFormat</a>.
NOTE: this test focuses on the docvalues impl, nothing else.
The [stretch] goal is for this test to be
so thorough in testing a new <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.DocValuesFormat.html">DocValuesFormat</a> that if this
test passes, then all Lucene/Solr tests should also pass. Ie,
if there is some bug in a given <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.DocValuesFormat.html">DocValuesFormat</a> that this
test fails to catch then this test needs to be improved!</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.BaseIndexFileFormatTestCase.html">BaseIndexFileFormatTestCase</a></h4>
<section><p>Common tests to all index formats.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.BaseMergePolicyTestCase.html">BaseMergePolicyTestCase</a></h4>
<section><p>Base test case for <a class="xref" href="../Lucene.Net/Lucene.Net.Index.MergePolicy.html">MergePolicy</a>.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.BasePostingsFormatTestCase.html">BasePostingsFormatTestCase</a></h4>
<section><p>Abstract class to do basic tests for a <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.PostingsFormat.html">PostingsFormat</a>.
NOTE: this test focuses on the postings
(docs/freqs/positions/payloads/offsets) impl, not the
terms dict. The [stretch] goal is for this test to be
so thorough in testing a new <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.PostingsFormat.html">PostingsFormat</a> that if this
test passes, then all Lucene/Solr tests should also pass. Ie,
if there is some bug in a given <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.PostingsFormat.html">PostingsFormat</a> that this
test fails to catch then this test needs to be improved!</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.BaseStoredFieldsFormatTestCase.html">BaseStoredFieldsFormatTestCase</a></h4>
<section><p>Base class aiming at testing <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.StoredFieldsFormat.html">StoredFieldsFormat</a>.
To test a new format, all you need is to register a new <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.Codec.html">Codec</a> which
uses it and extend this class and override <a class="xref" href="Lucene.Net.Index.BaseIndexFileFormatTestCase.html#Lucene_Net_Index_BaseIndexFileFormatTestCase_GetCodec">GetCodec()</a>.
<p>
<div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section>
<h4><a class="xref" href="Lucene.Net.Index.BaseTermVectorsFormatTestCase.html">BaseTermVectorsFormatTestCase</a></h4>
<section><p>Base class aiming at testing <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.TermVectorsFormat.html">TermVectorsFormat</a>.
To test a new format, all you need is to register a new <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.Codec.html">Codec</a> which
uses it and extend this class and override <a class="xref" href="Lucene.Net.Index.BaseIndexFileFormatTestCase.html#Lucene_Net_Index_BaseIndexFileFormatTestCase_GetCodec">GetCodec()</a>.
<p>
<div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section>
<h4><a class="xref" href="Lucene.Net.Index.BaseTermVectorsFormatTestCase.RandomDocument.html">BaseTermVectorsFormatTestCase.RandomDocument</a></h4>
<section></section>
<h4><a class="xref" href="Lucene.Net.Index.BaseTermVectorsFormatTestCase.RandomDocumentFactory.html">BaseTermVectorsFormatTestCase.RandomDocumentFactory</a></h4>
<section></section>
<h4><a class="xref" href="Lucene.Net.Index.BaseTermVectorsFormatTestCase.RandomTokenStream.html">BaseTermVectorsFormatTestCase.RandomTokenStream</a></h4>
<section></section>
<h4><a class="xref" href="Lucene.Net.Index.FieldFilterAtomicReader.html">FieldFilterAtomicReader</a></h4>
<section><p>A <a class="xref" href="../Lucene.Net/Lucene.Net.Index.FilterAtomicReader.html">FilterAtomicReader</a> that exposes only a subset
of fields from the underlying wrapped reader.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.MockIndexInput.html">MockIndexInput</a></h4>
<section><p><a class="xref" href="../Lucene.Net/Lucene.Net.Store.IndexInput.html">IndexInput</a> backed by a <span class="xref">byte[]</span> for testing.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.MockRandomMergePolicy.html">MockRandomMergePolicy</a></h4>
<section><p><a class="xref" href="../Lucene.Net/Lucene.Net.Index.MergePolicy.html">MergePolicy</a> that makes random decisions for testing.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.RandomCodec.html">RandomCodec</a></h4>
<section><p><a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.Codec.html">Codec</a> that assigns per-field random <a class="xref" href="../Lucene.Net/Lucene.Net.Codecs.PostingsFormat.html">PostingsFormat</a>s.
<p>
The same field/format assignment will happen regardless of order,
a hash is computed up front that determines the mapping.
This means fields can be put into things like <span class="xref">System.Collections.Generic.HashSet&lt;T&gt;</span>s and added to
documents in different orders and the test will still be deterministic
and reproducable.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.RandomIndexWriter.html">RandomIndexWriter</a></h4>
<section><p>Silly class that randomizes the indexing experience. EG
it may swap in a different merge policy/scheduler; may
commit periodically; may or may not forceMerge in the end,
may flush by doc count instead of RAM, etc.</p>
</section>
<h4><a class="xref" href="Lucene.Net.Index.TestPointInfoStream.html">TestPointInfoStream</a></h4>
<section></section>
<h4><a class="xref" href="Lucene.Net.Index.ThreadedIndexingAndSearchingTestCase.html">ThreadedIndexingAndSearchingTestCase</a></h4>
<section><p>Utility class that spawns multiple indexing and
searching threads.</p>
</section>
<h3 id="interfaces">Interfaces
</h3>
<h4><a class="xref" href="Lucene.Net.Index.ITestPoint.html">ITestPoint</a></h4>
<section><p>Simple interface that is executed for each <code>TP</code> <a class="xref" href="../Lucene.Net/Lucene.Net.Util.InfoStream.html">InfoStream</a> component
message. See also <a class="xref" href="Lucene.Net.Index.RandomIndexWriter.html#Lucene_Net_Index_RandomIndexWriter_MockIndexWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_IndexWriterConfig_Lucene_Net_Index_ITestPoint_">MockIndexWriter(Directory, IndexWriterConfig, ITestPoint)</a>.</p>
</section>
<h3 id="enums">Enums
</h3>
<h4><a class="xref" href="Lucene.Net.Index.BaseTermVectorsFormatTestCase.Options.html">BaseTermVectorsFormatTestCase.Options</a></h4>
<section><p>A combination of term vectors options.</p>
</section>
</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/blob/docs-4.8.0-beta00007/src/Lucene.Net.TestFramework/Index/package.md/#L2" class="contribution-link">Improve this Doc</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>