From 272cd7ebbdbf274b61eacb3b6a5d0d0d8b15f23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Mon, 20 Mar 2023 13:39:19 +0100 Subject: [PATCH] Small cleanup --- milli/src/search/new/logger/detailed.rs | 6 +++--- .../src/search/new/ranking_rule_graph/mod.rs | 3 --- .../search/new/ranking_rule_graph/typo/mod.rs | 1 + milli/src/search/new/small_bitmap.rs | 21 ------------------- 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/milli/src/search/new/logger/detailed.rs b/milli/src/search/new/logger/detailed.rs index 45a74a585..19a2679a8 100644 --- a/milli/src/search/new/logger/detailed.rs +++ b/milli/src/search/new/logger/detailed.rs @@ -488,9 +488,9 @@ shape: class" let p = ctx.word_interner.get(*use_prefix_db); writeln!(file, "use prefix DB : {p}").unwrap(); } - for d in distances.iter() { - writeln!(file, "\"d_{d}\" : distance").unwrap(); - } + // for d in distances.iter() { + // writeln!(file, "\"d_{d}\" : distance").unwrap(); + // } writeln!(file, "}}").unwrap(); } diff --git a/milli/src/search/new/ranking_rule_graph/mod.rs b/milli/src/search/new/ranking_rule_graph/mod.rs index 34363febe..528ff3107 100644 --- a/milli/src/search/new/ranking_rule_graph/mod.rs +++ b/milli/src/search/new/ranking_rule_graph/mod.rs @@ -71,9 +71,6 @@ impl PartialEq for Edge { /// 1. Retrieve the set of edges (their cost and condition) between two nodes. /// 2. Compute the document ids satisfying a condition pub trait RankingRuleGraphTrait: Sized { - /// The condition of an edge connecting two query nodes. The condition - /// should be sufficient to compute the edge's cost and associated document ids - /// in [`resolve_condition`](RankingRuleGraphTrait::resolve_condition). type Condition: Sized + Clone + PartialEq + Eq + Hash; /// Return the label of the given edge condition, to be used when visualising diff --git a/milli/src/search/new/ranking_rule_graph/typo/mod.rs b/milli/src/search/new/ranking_rule_graph/typo/mod.rs index a32274954..32b905244 100644 --- a/milli/src/search/new/ranking_rule_graph/typo/mod.rs +++ b/milli/src/search/new/ranking_rule_graph/typo/mod.rs @@ -74,6 +74,7 @@ impl RankingRuleGraphTrait for TypoGraph { is_prefix: term.is_prefix, zero_typo: term.zero_typo, prefix_of: term.prefix_of, + // TOOD: debatable synonyms: term.synonyms, split_words: None, one_typo: Box::new([]), diff --git a/milli/src/search/new/small_bitmap.rs b/milli/src/search/new/small_bitmap.rs index 1fdd31346..503bd72f5 100644 --- a/milli/src/search/new/small_bitmap.rs +++ b/milli/src/search/new/small_bitmap.rs @@ -272,24 +272,3 @@ impl<'b> Iterator for SmallBitmapInternalIter<'b> { } } } - -// #[cfg(test)] -// mod tests { -// use super::SmallBitmap; - -// #[test] -// fn test_small_bitmap() { -// let mut bitmap1 = SmallBitmap::new(32); -// for x in 0..16 { -// bitmap1.insert(x * 2); -// } -// let mut bitmap2 = SmallBitmap::new(32); -// for x in 0..=10 { -// bitmap2.insert(x * 3); -// } -// bitmap1.intersection(&bitmap2); -// for v in bitmap1.iter() { -// println!("{v}"); -// } -// } -// }