exact_attribute: dedup nodes after sorting them

This commit is contained in:
Louis Dureuil 2023-04-06 15:58:29 +02:00 committed by Louis Dureuil
parent 130d2061bd
commit 618c54915d

View File

@ -113,6 +113,8 @@ impl State {
} }
exact_term_position_ids.sort_by_key(|(_, _, id)| *id); exact_term_position_ids.sort_by_key(|(_, _, id)| *id);
exact_term_position_ids.dedup_by_key(|(_, _, id)| *id);
// bail if there is a "hole" (missing word) in remaining query graph // bail if there is a "hole" (missing word) in remaining query graph
if let Some((_, _, first_id)) = exact_term_position_ids.first() { if let Some((_, _, first_id)) = exact_term_position_ids.first() {
if *first_id != 0 { if *first_id != 0 {