CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Implementation of algorithm 2, Team-Draft Interleaving, from F. More...
Public Member Functions | |
__construct ( $searchTerm) | |
interleave (CirrusSearchResultSet $a, CirrusSearchResultSet $b, $limit) | |
Static Public Member Functions | |
static | interleaveResults ( $a, $b, $limit) |
Interleave two arrays using team draft interleaving. | |
Implementation of algorithm 2, Team-Draft Interleaving, from F.
Radlinski, M. Kurup, and T. Joachims. How does clickthrough data reflect retrieval quality? In Proc 17th Intl. Conf. on Information and Knowledge Management. ACM New York, NY, USA, 2008.
CirrusSearch\Search\TeamDraftInterleaver::__construct | ( | $searchTerm | ) |
string | $searchTerm | The query provided by the user. |
CirrusSearch\Search\TeamDraftInterleaver::interleave | ( | CirrusSearchResultSet | $a, |
CirrusSearchResultSet | $b, | ||
$limit ) |
CirrusSearchResultSet | $a | Results for team A |
CirrusSearchResultSet | $b | Results for team B |
int | $limit | Maximum number of results to return |
|
static |
Interleave two arrays using team draft interleaving.
Only public for unit tests. The id's used as keys in $a and $b must represent the same thing, to prevent duplicates in the returned results.
mixed[] | $a | Map from id to anything in preferred order for team A |
mixed[] | $b | Map from id to anything in preferred order for team B |
int | $limit | Maximum number of results to interleave |