diff --git a/Cargo.lock b/Cargo.lock index b2ac66b..8998452 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "simsearch" -version = "0.2.4" +version = "0.2.5" dependencies = [ "criterion", "inquire", diff --git a/Cargo.toml b/Cargo.toml index f96f947..8158e97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["andylokandy "] edition = "2018" name = "simsearch" -version = "0.2.4" +version = "0.2.5" license = "MIT/Apache-2.0" description = "A simple and lightweight fuzzy search engine that works in memory, searching for similar strings (a pun here)." diff --git a/src/lib.rs b/src/lib.rs index 7b5ad42..a97e36a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -148,7 +148,6 @@ where let mut tokens = self.tokenize(tokens); tokens.sort(); - tokens.dedup(); for token in tokens.clone() { self.reverse_map @@ -214,7 +213,6 @@ where pub fn search_tokens(&self, pattern_tokens: &[&str]) -> Vec { let mut pattern_tokens = self.tokenize(pattern_tokens); pattern_tokens.sort(); - pattern_tokens.dedup(); let mut token_scores: HashMap<&str, f64> = HashMap::new();