# Package org.apache.lucene.index

Support for testing of indexes.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  RandomIndexWriter.TestPoint | Simple interface that is executed for each `TP` `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 | A `DirectoryReader` that wraps all its subreaders with `AssertingLeafReader`
  AssertingLeafReader | A `FilterLeafReader` that can be used to apply additional checks for tests.
  AssertingLeafReader.AssertingBinaryDocValues | Wraps a BinaryDocValues but with additional asserts
  AssertingLeafReader.AssertingBits | Wraps a Bits but with additional asserts
  AssertingLeafReader.AssertingFields | Wraps a Fields but with additional asserts
  AssertingLeafReader.AssertingNumericDocValues | Wraps a NumericDocValues but with additional asserts
  AssertingLeafReader.AssertingPostingsEnum | Wraps a docsenum with additional checks
  AssertingLeafReader.AssertingRandomAccessOrds | Wraps a RandomAccessOrds but with additional asserts
  AssertingLeafReader.AssertingSortedDocValues | Wraps a SortedDocValues but with additional asserts
  AssertingLeafReader.AssertingSortedNumericDocValues | Wraps a SortedSetDocValues but with additional asserts
  AssertingLeafReader.AssertingSortedSetDocValues | Wraps a SortedSetDocValues but with additional asserts
  AssertingLeafReader.AssertingTerms | Wraps a Terms but with additional asserts
  BaseCompoundFormatTestCase | Abstract class to do basic tests for a compound format.
  BaseCompressingDocValuesFormatTestCase | Extends `BaseDocValuesFormatTestCase` 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.
  BaseMergePolicyTestCase | Base test case for `MergePolicy`.
  BaseNormsFormatTestCase | 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 testing `stored fields formats`.
  BaseTermVectorsFormatTestCase | Base class aiming at testing `term vectors formats`.
  BaseTermVectorsFormatTestCase.RandomTokenStream | Produces a random TokenStream based off of provided terms.
  BaseTestCheckIndex | Base class for CheckIndex tests.
  FieldFilterLeafReader | A `FilterLeafReader` that exposes only a subset of fields from the underlying wrapped reader.
  ForceMergePolicy | A `MergePolicy` that only returns forced merges.
  IndexWriterMaxDocsChanger | Accessor to make some package protected methods in `IndexWriter` available for testing.
  MismatchedDirectoryReader | A `DirectoryReader` that wraps all its subreaders with `MismatchedLeafReader`
  MismatchedLeafReader | Shuffles field numbers around to try to trip bugs where field numbers are assumed to always be consistent across segments.
  MockRandomMergePolicy | MergePolicy that makes random decisions for testing.
  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 to `PointValues.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 postings
  SuppressingConcurrentMergeScheduler | A `ConcurrentMergeScheduler` 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.

## Package org.apache.lucene.index Description

Support for testing of indexes.

The primary classes are:

- `RandomIndexWriter`: Randomizes the indexing experience.
- `MockRandomMergePolicy`: MergePolicy that makes random decisions.

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.