Package org.apache.lucene.tests.search
package org.apache.lucene.tests.search
Support for testing search components.
The primary classes are:
QueryUtils: Useful methods for testing Query classes.ShardSearchingTestBase: Base class for simulating distributed search.
-
ClassDescriptionWraps a Scorer with additional checksA collector that asserts that it is used correctly.Helper class that adds some extra checks to ensure correct usage of
IndexSearcherandWeight.An implementation ofMatcheswith additional consistency checks.Assertion-enabled query.Wraps another Scorable and asserts that scores are reasonable and only called when positionedWraps a Scorer with additional checksTests 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.Abstract class to do basic tests for a RangeField query.base class for range verificationsupported query relationsQuery wrapper that reduces the size of max-score blocks to more easily detect problems with the max-score logic.ABulkScorer-backed scorer.Utility class for asserting expected hits in tests.Asserts that the score explanation for every document matching a query corresponds with the true score.an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.Asserts that theMatchesfrom a query is non-null whenever the document its created for is a hit.Just collects document ids into a set.AQuerywrapper that disables bulk-scoring optimizations.A dummy version ofTotalHitCountCollectorthat doesn't shortcut usingWeight.count(org.apache.lucene.index.LeafReaderContext).Collector that accumulates matching docs in aFixedBitSetBase class for tests checking theWeight.matches(LeafReaderContext, int)implementationsEncapsulates a term position, start and end offsetUtility class for sanity-checking queries.AQuerythat adds random approximations to its scorers.A wrapper around aDocIdSetIteratorthat matches the same documents, but introduces false positives that need to be verified viaTwoPhaseIterator.matches().Simple base class for checking search equivalence.Base test class for simulating distributed search across multiple shards.An IndexSearcher and associated version (lease)Thrown when the lease for a searcher has expired.