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.

The assumption is that if all of the "primitive" queries work well, then anything that rewrites to a primitive will work well also.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun bqtest(q: Query, expDocNrs: IntArray)

Tests a query using qtest after wrapping it with both optB and reqB

Link copied to clipboard
fun optB(q: Query): Query

MACRO: Wraps a Query in a BooleanQuery so that it is optional, along with a second prohibited clause which will never match anything

Link copied to clipboard
open fun qtest(q: Query, expDocNrs: IntArray)

check the expDocNrs match and have scores that match the explanations. Query may be randomly wrapped in a BooleanQuery with a term that matches no documents.

Link copied to clipboard
fun reqB(q: Query): Query

MACRO: Wraps a Query in a BooleanQuery so that it is required, along with a second optional clause which will match everything

Link copied to clipboard