Package org.apache.lucene.tests.index
Support for testing of indexes.
The primary classes are:
RandomIndexWriter
: Randomizes the indexing experience.MockRandomMergePolicy
: MergePolicy that makes random decisions.
-
Interface Summary Interface Description RandomIndexWriter.TestPoint Simple interface that is executed for eachTP
InfoStream
component message. -
Class Summary Class Description AlcoholicMergePolicy Merge policy for testing, it is like an alcoholic.AllDeletedFilterReader Filters the incoming reader and makes all documents appear deleted.AssertingDirectoryReader ADirectoryReader
that wraps all its subreaders withAssertingLeafReader
AssertingLeafReader AFilterLeafReader
that can be used to apply additional checks for tests.AssertingLeafReader.AssertingBinaryDocValues Wraps a BinaryDocValues but with additional assertsAssertingLeafReader.AssertingBits Wraps a Bits but with additional assertsAssertingLeafReader.AssertingFields Wraps a Fields but with additional assertsAssertingLeafReader.AssertingImpactsEnum Wraps aImpactsEnum
with additional checksAssertingLeafReader.AssertingNumericDocValues Wraps a NumericDocValues but with additional assertsAssertingLeafReader.AssertingPointValues Wraps a SortedSetDocValues but with additional assertsAssertingLeafReader.AssertingPostingsEnum Wraps a docsenum with additional checksAssertingLeafReader.AssertingSortedDocValues Wraps a SortedDocValues but with additional assertsAssertingLeafReader.AssertingSortedNumericDocValues Wraps a SortedNumericDocValues but with additional assertsAssertingLeafReader.AssertingSortedSetDocValues Wraps a SortedSetDocValues but with additional assertsAssertingLeafReader.AssertingStoredFields Wraps a StoredFields but with additional assertsAssertingLeafReader.AssertingTerms Wraps a Terms but with additional assertsAssertingLeafReader.AssertingTermVectors Wraps a TermVectors but with additional assertsBaseCompoundFormatTestCase Abstract class to do basic tests for a compound format.BaseCompressingDocValuesFormatTestCase ExtendsBaseDocValuesFormatTestCase
to add compression checks.BaseDocValuesFormatTestCase Abstract class to do basic tests for a docvalues format.BaseFieldInfoFormatTestCase Abstract class to do basic tests for fis format.BaseIndexFileFormatTestCase Common tests to all index formats.BaseIndexFileFormatTestCase.FileTrackingDirectoryWrapper A directory that tracks created files that haven't been deleted.BaseIndexFileFormatTestCase.ReadBytesDirectoryWrapper A directory that tracks read bytes.BaseKnnVectorsFormatTestCase Base class aiming at testingvectors formats
.BaseLiveDocsFormatTestCase Abstract class that performs basic testing of a codec'sLiveDocsFormat
.BaseMergePolicyTestCase Base test case forMergePolicy
.BaseMergePolicyTestCase.IOStats Statistics about bytes written to storage.BaseMergePolicyTestCase.MockMergeContext Simple mock merge context for testsBaseNormsFormatTestCase Abstract class to do basic tests for a norms format.BasePointsFormatTestCase Abstract class to do basic tests for a points format.BasePostingsFormatTestCase Abstract class to do basic tests for a postings format.BaseSegmentInfoFormatTestCase Abstract class to do basic tests for si format.BaseStoredFieldsFormatTestCase Base class aiming at testingstored fields formats
.BaseTermVectorsFormatTestCase Base class aiming at testingterm vectors formats
.BaseTermVectorsFormatTestCase.RandomTokenStream Produces a random TokenStream based off of provided terms.BaseTestCheckIndex Base class for CheckIndex tests.DocHelper Helper functions for tests that handles documentsFieldFilterLeafReader AFilterLeafReader
that exposes only a subset of fields from the underlying wrapped reader.ForceMergePolicy AMergePolicy
that only returns forced merges.MergingCodecReader CodecReader
wrapper that performs all reads using the merging instance of the index formats.MergingDirectoryReaderWrapper DirectoryReader
wrapper that uses the merge instances of the wrappedCodecReader
s.MismatchedDirectoryReader ADirectoryReader
that wraps all its subreaders withMismatchedLeafReader
MismatchedLeafReader Shuffles field numbers around to try to trip bugs where field numbers are assumed to always be consistent across segments.MockIndexWriterEventListener Mock IndexWriterEventListener to verify invocation of event methodsMockRandomMergePolicy MergePolicy that makes random decisions for testing.OwnCacheKeyMultiReader AMultiReader
that has its own cache key, occasionally useful for testing purposes.PerThreadPKLookup Utility class to do efficient primary-key (only 1 doc contains the given term) lookups by segment, re-using the enums.PointsStackTracker Simple utility class to track the current BKD stack based solely on calls toPointValues.IntersectVisitor.compare(byte[], byte[])
.RandomCodec Codec that assigns per-field random postings formats.RandomIndexWriter Silly class that randomizes the indexing experience.RandomPostingsTester Helper class extracted from BasePostingsFormatTestCase to exercise a postings format.RandomPostingsTester.FieldAndTerm Holds one field, term and ord.RandomPostingsTester.SeedPostings Given the same random seed this always enumerates the same random postingsSuppressingConcurrentMergeScheduler AConcurrentMergeScheduler
that ignores AlreadyClosedException.ThreadedIndexingAndSearchingTestCase Utility class that spawns multiple indexing and searching threads. -
Enum Summary Enum Description BaseTermVectorsFormatTestCase.Options A combination of term vectors options.RandomPostingsTester.Option Which features to test.