checkHits

fun checkHits(random: Random, query: Query, defaultFieldName: String, searcher: IndexSearcher, results: IntArray)

Tests that a query matches the expected set of documents using Hits.

Note that when using the Hits API, documents will only be returned if they have a positive normalized score.

Parameters

query

the query to test

searcher

the searcher to test the query against

defaultFieldName

used for displaing the query in assertion messages

results

a list of documentIds that must match the query

See also

.checkHitCollector