Namespace Lucene.Net.Index
Classes
AlcoholicMergePolicy
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.
If tests pass with this, then they are likely to pass with any bizarro merge policy users might write.
It is a fine bottle of champagne (Ordered by Martijn).
AllDeletedFilterReader
Filters the incoming reader and makes all documents appear deleted.
AssertingAtomicReader
A Lucene.Net.Index.FilterAtomicReader that can be used to apply additional checks for tests.
AssertingBinaryDocValues
Wraps a Lucene.Net.Index.BinaryDocValues but with additional asserts
AssertingBits
Wraps a Lucene.Net.Util.IBits but with additional asserts
AssertingDirectoryReader
A Lucene.Net.Index.DirectoryReader that wraps all its subreaders with AssertingAtomicReader
AssertingDocsEnum
Wraps a Lucene.Net.Index.DocsEnum with additional checks
AssertingFields
Wraps a Lucene.Net.Index.Fields but with additional asserts
AssertingNumericDocValues
Wraps a Lucene.Net.Index.NumericDocValues but with additional asserts
AssertingSortedDocValues
Wraps a Lucene.Net.Index.SortedDocValues but with additional asserts
AssertingSortedSetDocValues
Wraps a Lucene.Net.Index.SortedSetDocValues but with additional asserts
AssertingTerms
Wraps a Lucene.Net.Index.Terms but with additional asserts
BaseCompressingDocValuesFormatTestCase
Extends BaseDocValuesFormatTestCase to add compression checks.
BaseDocValuesFormatTestCase
Abstract class to do basic tests for a Lucene.Net.Codecs.DocValuesFormat. 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 Lucene.Net.Codecs.DocValuesFormat that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug in a given Lucene.Net.Codecs.DocValuesFormat that this test fails to catch then this test needs to be improved!
BaseIndexFileFormatTestCase
Common tests to all index formats.
BaseMergePolicyTestCase
Base test case for Lucene.Net.Index.MergePolicy.
BasePostingsFormatTestCase
Abstract class to do basic tests for a Lucene.Net.Codecs.PostingsFormat. 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 Lucene.Net.Codecs.PostingsFormat that if this test passes, then all Lucene/Solr tests should also pass. Ie, if there is some bug in a given Lucene.Net.Codecs.PostingsFormat that this test fails to catch then this test needs to be improved!
BaseStoredFieldsFormatTestCase
Base class aiming at testing Lucene.Net.Codecs.StoredFieldsFormat. To test a new format, all you need is to register a new Lucene.Net.Codecs.Codec which uses it and extend this class and override GetCodec().
Note
This API is experimental and might change in incompatible ways in the next release.
BaseTermVectorsFormatTestCase
Base class aiming at testing Lucene.Net.Codecs.TermVectorsFormat. To test a new format, all you need is to register a new Lucene.Net.Codecs.Codec which uses it and extend this class and override GetCodec().
Note
This API is experimental and might change in incompatible ways in the next release.
BaseTermVectorsFormatTestCase.RandomDocument
BaseTermVectorsFormatTestCase.RandomDocumentFactory
BaseTermVectorsFormatTestCase.RandomTokenStream
FieldFilterAtomicReader
A Lucene.Net.Index.FilterAtomicReader that exposes only a subset of fields from the underlying wrapped reader.
MockIndexInput
Lucene.Net.Store.IndexInput backed by a byte[] for testing.
MockRandomMergePolicy
Lucene.Net.Index.MergePolicy that makes random decisions for testing.
RandomCodec
Lucene.Net.Codecs.Codec that assigns per-field random Lucene.Net.Codecs.PostingsFormats.
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 HashSet<T>s and added to documents in different orders and the test will still be deterministic and reproducable.RandomIndexWriter
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.
TestPointInfoStream
ThreadedIndexingAndSearchingTestCase
Utility class that spawns multiple indexing and searching threads.
Interfaces
ITestPoint
Simple interface that is executed for each TP
Lucene.Net.Util.InfoStream component
message. See also MockIndexWriter(Directory, IndexWriterConfig, ITestPoint).
Enums
BaseTermVectorsFormatTestCase.Options
A combination of term vectors options.