Fix bug in computation of query term at a position

This commit is contained in:
Loïc Lecrenier
2023-05-01 16:26:01 +02:00
parent 11f814821d
commit 1b514517f5
5 changed files with 84 additions and 40 deletions

View File

@ -35,7 +35,6 @@ impl RankingRuleGraphTrait for PositionGraph {
*position,
)?;
}
Ok(ComputedCondition {
docids,
universe_len: universe.len(),
@ -91,15 +90,12 @@ impl RankingRuleGraphTrait for PositionGraph {
};
positions_for_costs.entry(cost).or_default().push(position);
}
println!(
"positions for cost {} : {positions_for_costs:?}",
term.term_subset.description(ctx)
);
let mut edges = vec![];
for (cost, positions) in positions_for_costs {
// TODO: We can improve performances and relevancy by storing
// the term subsets associated to each position fetched.
// the term subsets associated to each position fetched
edges.push((
cost,
conditions_interner.insert(PositionCondition {