# Package org.apache.lucene.search

Support for testing search components.

See: Description

- Class Summary
  Class | Description
  --- | ---
  AssertingIndexSearcher | Helper class that adds some extra checks to ensure correct usage of `IndexSearcher` and `Weight`.
  AssertingQuery | Assertion-enabled query.
  AssertingScorable | Wraps another Scorable and asserts that scores are reasonable and only called when positioned
  AssertingScorer | Wraps a Scorer with additional checks
  BaseExplanationTestCase | Tests primitive queries (ie: that rewrite to themselves) to insure they match the expected set of docs, and that the score of each match is equal to the value of the scores explanation.
  BaseRangeFieldQueryTestCase | Abstract class to do basic tests for a RangeField query.
  BaseRangeFieldQueryTestCase.Range | base class for range verification
  BlockScoreQueryWrapper | Query wrapper that reduces the size of max-score blocks to more easily detect problems with the max-score logic.
  BulkScorerWrapperScorer | A `BulkScorer`-backed scorer.
  CheckHits | Utility class for asserting expected hits in tests.
  CheckHits.ExplanationAsserter | Asserts that the score explanation for every document matching a query corresponds with the true score.
  CheckHits.ExplanationAssertingSearcher | an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
  CheckHits.MatchesAsserter | Asserts that the `Matches` from a query is non-null whenever the document its created for is a hit.
  CheckHits.SetCollector | Just collects document ids into a set.
  QueryUtils | Utility class for sanity-checking queries.
  RandomApproximationQuery | A `Query` that adds random approximations to its scorers.
  ScorerIndexSearcher | An `IndexSearcher` that always uses the `Scorer` API, never `BulkScorer`.
  SearchEquivalenceTestBase | Simple base class for checking search equivalence.
  ShardSearchingTestBase | Base test class for simulating distributed search across multiple shards.
  ShardSearchingTestBase.SearcherAndVersion | An IndexSearcher and associated version (lease)

- Enum Summary
  Enum | Description
  --- | ---
  BaseRangeFieldQueryTestCase.Range.QueryType | supported query relations

- Exception Summary
  Exception | Description
  --- | ---
  ShardSearchingTestBase.SearcherExpiredException | Thrown when the lease for a searcher has expired.

## Package org.apache.lucene.search Description

Support for testing search components.

The primary classes are:

- `QueryUtils`: Useful methods for testing Query classes.
- `ShardSearchingTestBase`: Base class for simulating distributed search.

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