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.
-
ClassDescriptionHelper class that adds some extra checks to ensure correct usage of
IndexSearcher
andWeight
.An implementation ofMatches
with 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 theMatches
from a query is non-null whenever the document its created for is a hit.Just collects document ids into a set.Base class for tests checking theWeight.matches(LeafReaderContext, int)
implementationsEncapsulates a term position, start and end offsetUtility class for sanity-checking queries.AQuery
that adds random approximations to its scorers.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.