From 618c54915d57989f27c705dcf674dde35b9b73a1 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 6 Apr 2023 15:58:29 +0200 Subject: [PATCH] exact_attribute: dedup nodes after sorting them --- milli/src/search/new/exact_attribute.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/milli/src/search/new/exact_attribute.rs b/milli/src/search/new/exact_attribute.rs index fa837272b..b82a60597 100644 --- a/milli/src/search/new/exact_attribute.rs +++ b/milli/src/search/new/exact_attribute.rs @@ -113,6 +113,8 @@ impl State { } 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 if let Some((_, _, first_id)) = exact_term_position_ids.first() { if *first_id != 0 {