Class CheckHits
Utility class for asserting expected hits in tests.
Inheritance
System.Object
CheckHits
Assembly: Lucene.Net.TestFramework.dll
Syntax
public class CheckHits : object
Fields
Name |
Description |
EXPLAIN_SCORE_TOLERANCE_DELTA
|
Some explains methods calculate their values though a slightly
different order of operations from the actual scoring method ...
this allows for a small amount of relative variation
|
EXPLAIN_SCORE_TOLERANCE_MINIMUM
|
In general we use a relative epsilon, but some tests do crazy things
like boost documents with 0, creating tiny tiny scores where the
relative difference is large but the absolute difference is tiny.
we ensure the the epsilon is always at least this big.
|
Methods
Name |
Description |
CheckDocIds(String, Int32[], ScoreDoc[])
|
Tests that a Hits has an expected order of documents
|
CheckEqual(Query, ScoreDoc[], ScoreDoc[])
|
|
CheckExplanations(Query, String, IndexSearcher)
|
|
CheckExplanations(Query, String, IndexSearcher, Boolean)
|
|
CheckHitCollector(Random, Query, String, IndexSearcher, Int32[], Similarity)
|
|
CheckHitsQuery(Query, ScoreDoc[], ScoreDoc[], Int32[])
|
Tests that two queries have an expected order of documents,
and that the two queries have the same score values.
|
CheckNoMatchExplanations(Query, String, IndexSearcher, Int32[])
|
Tests that all documents up to maxDoc which are not in the
expected result set, have an explanation which indicates that
the document does not match
|
DoCheckHits(Random, Query, String, IndexSearcher, Int32[], Similarity)
|
|
ExplainToleranceDelta(Single, Single)
|
returns a reasonable epsilon for comparing two floats,
where minor differences are acceptable such as score vs. explain
|
Hits2str(ScoreDoc[], ScoreDoc[], Int32, Int32)
|
|
TopdocsString(TopDocs, Int32, Int32)
|
|
VerifyExplanation(String, Int32, Single, Boolean, Explanation)
|
Assert that an explanation has the expected score, and optionally that its
sub-details max/sum/factor match to that score.
|
Extension Methods