Package org.apache.lucene.tests.search
Class CheckHits.ExplanationAsserter
java.lang.Object
org.apache.lucene.search.SimpleCollector
org.apache.lucene.tests.search.CheckHits.ExplanationAsserter
- All Implemented Interfaces:
Collector,LeafCollector
- Enclosing class:
CheckHits
Asserts that the score explanation for every document matching a query corresponds with the
true score.
NOTE: this HitCollector should only be used with the Query and Searcher specified at when it is constructed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExplanationAsserter(Query q, String defaultFieldName, IndexSearcher s) Constructs an instance which does shallow tests on the ExplanationExplanationAsserter(Query q, String defaultFieldName, IndexSearcher s, boolean deep) -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect(int doc) protected voiddoSetNextReader(LeafReaderContext context) voidMethods inherited from class org.apache.lucene.search.SimpleCollector
getLeafCollectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.search.LeafCollector
collect, competitiveIterator, finish
-
Constructor Details
-
ExplanationAsserter
Constructs an instance which does shallow tests on the Explanation -
ExplanationAsserter
-
-
Method Details
-
setScorer
- Specified by:
setScorerin interfaceLeafCollector- Overrides:
setScorerin classSimpleCollector- Throws:
IOException
-
collect
- Specified by:
collectin interfaceLeafCollector- Specified by:
collectin classSimpleCollector- Throws:
IOException
-
doSetNextReader
- Overrides:
doSetNextReaderin classSimpleCollector- Throws:
IOException
-
scoreMode
-