Package org.apache.lucene.tests.index
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.
-
ClassDescriptionMerge policy for testing, it is like an alcoholic.Filters the incoming reader and makes all documents appear deleted.A
DirectoryReaderthat wraps all its subreaders withAssertingLeafReaderAFilterLeafReaderthat can be used to apply additional checks for tests.Wraps a BinaryDocValues but with additional assertsWraps a Bits but with additional assertsWraps a DocValuesSkipper but with additional assertsWraps a Fields but with additional assertsWraps aImpactsEnumwith additional checksWraps a NumericDocValues but with additional assertsWraps a SortedSetDocValues but with additional assertsWraps a docsenum with additional checksWraps a SortedDocValues but with additional assertsWraps a SortedNumericDocValues but with additional assertsWraps a SortedSetDocValues but with additional assertsWraps a StoredFields but with additional assertsWraps a Terms but with additional assertsWraps a TermVectors but with additional assertsAbstract class to do basic tests for a compound format.ExtendsBaseDocValuesFormatTestCaseto add compression checks.ExtendsLegacyBaseDocValuesFormatTestCaseand adds checks forDocValuesSkipper.Abstract class to do basic tests for fis format.Common tests to all index formats.A directory that tracks created files that haven't been deleted.A directory that tracks read bytes.Base class aiming at testingvectors formats.Abstract class that performs basic testing of a codec'sLiveDocsFormat.Base test case forMergePolicy.Statistics about bytes written to storage.Simple mock merge context for testsAbstract class to do basic tests for a norms format.Abstract class to do basic tests for a points format.Abstract class to do basic tests for a postings format.Abstract class to do basic tests for si format.Base class aiming at testingstored fields formats.Base class aiming at testingterm vectors formats.A combination of term vectors options.Produces a random TokenStream based off of provided terms.Base class for CheckIndex tests.Helper functions for tests that handles documentsAFilterLeafReaderthat exposes only a subset of fields from the underlying wrapped reader.AMergePolicythat only returns forced merges.Abstract class to do basic tests for a docvalues format.CodecReaderwrapper that performs all reads using the merging instance of the index formats.DirectoryReaderwrapper that uses the merge instances of the wrappedCodecReaders.Shuffles field numbers around to try to trip bugs where field numbers are assumed to always be consistent across segments.ADirectoryReaderthat wraps all its subreaders withMismatchedLeafReaderShuffles field numbers around to try to trip bugs where field numbers are assumed to always be consistent across segments.Mock IndexWriterEventListener to verify invocation of event methodsMergePolicy that makes random decisions for testing.AMultiReaderthat has its own cache key, occasionally useful for testing purposes.Utility class to do efficient primary-key (only 1 doc contains the given term) lookups by segment, re-using the enums.Simple utility class to track the current BKD stack based solely on calls toPointValues.IntersectVisitor.compare(byte[], byte[]).Codec that assigns per-field random postings formats.Silly class that randomizes the indexing experience.Simple interface that is executed for eachTPInfoStreamcomponent message.Helper class extracted from BasePostingsFormatTestCase to exercise a postings format.Holds one field, term and ord.Which features to test.Given the same random seed this always enumerates the same random postingsAConcurrentMergeSchedulerthat ignores AlreadyClosedException.Utility class that spawns multiple indexing and searching threads.