pub fn bm25_groups(
groups: &[Vec<Vec<String>>],
query: &str,
second: f64,
) -> Vec<f64>Expand description
BM25 (BM25_K1, BM25_B) of groups of documents, one group per lesson, against the query text: a
group scores its best document plus second × its second best (0: the best alone). Document
frequencies count groups (a word in three facets of one lesson is one lesson), so idf means what it
means in bm25; term frequency and length are per document. Groups of one document score as bm25
does. Only query words are counted, which keeps a 1k-lesson store with facets fast.