pub fn apply_judgements(mut self, mut judgements: Judgements) -> Self {
        self.0.sort();
        judgements.0.sort();
        let compare = |res: &ResultRecord, rel: &JudgementRecord| {
            (&res.iter, &res.qid, &res.docid).cmp(&(&rel.iter, &rel.qid, &rel.docid))
        };
        Self(
            self.0
                .into_iter()
                .merge_join_by(judgements.0, compare)
                .filter_map(|either| match either {
                    Left(result) => Some(result.with_relevance(Relevance::Missing)),
                    Right(_) => None,
                    Both(result, judgement) => Some(result.with_relevance(judgement.relevance)),
                })
                .collect(),
        )
    }
/// Consumes a result set and judgements, and returns a new result set with applied judgements.
Consumes a result set and judgements, and returns a new result set with applied judgements.
Consumes a result set and judgements and returns a new result set with applied judgements .
pub fn apply_judgements(mut self, mut judgements: Judgements) -> Self {
        self.0.sort();
        judgements.0.sort();
        let compare = |res: &ResultRecord, rel: &JudgementRecord| {
            (&res.iter, &res.qid, &res.docid).cmp(&(&rel.iter, &rel.qid, &rel.docid))
        };
        Self(
            self.0
                .into_iter()
                .merge_join_by(judgements.0, compare)
                .filter_map(|either| match either {
                    Left(result) => Some(result.with_relevance(Relevance::Missing)),
                    Right(_) => None,
                    Both(result, judgement) => Some(result.with_relevance(judgement.relevance)),
                })
                .collect(),
        )
    }
pub fn apply_judgements ( mut self , mut judgements : Judgements ) -> Self { self . 0 . sort ( ) ; judgements . 0 . sort ( ) ; let compare = | res : & ResultRecord , rel : & JudgementRecord | { ( & res . iter , & res . qid , & res . docid ) . cmp ( & ( & rel . iter , & rel . qid , & rel . docid ) ) } ; Self ( self . 0 . into_iter ( ) . merge_join_by ( judgements . 0 , compare ) . filter_map ( | either | match either { Left ( result ) => Some ( result . with_relevance ( Relevance :: Missing ) ) , Right ( _ ) => None , Both ( result , judgement ) => Some ( result . with_relevance ( judgement . relevance ) ) , } ) . collect ( ) , ) }
Consumes a result set and judgements, and returns a new result set with applied judgements.
Consumes a result set and judgements and returns a new result set with applied judgements .
mut self
judgements
Judgements