From b994887c19eb88e4643b0c8487abf5edce045231 Mon Sep 17 00:00:00 2001 From: muji Date: Thu, 8 Feb 2024 15:25:03 +0800 Subject: [PATCH 1/3] Update hashbrown dependency. Should resolve the problem with the transient ahash dependency (v0.7.7) failing to build on latest nightly due to explicit check for strsimd feature which no longer exists in nightly. Remove unnecessary mut. --- Cargo.toml | 2 +- src/index.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87b3662..a7be35e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ exclude = [".github/**", ".gitignore", ".rustfmt.toml"] [dependencies] typed-generational-arena = "0.2" -hashbrown = "0.12.3" +hashbrown = "0.14" [dev-dependencies] lazy_static = "1.4.0" diff --git a/src/index.rs b/src/index.rs index 996c104..44c0052 100644 --- a/src/index.rs +++ b/src/index.rs @@ -91,7 +91,7 @@ impl Index { for i in 0..fields.len() { let field_values = field_accessors[i](doc); let fields_len = fields.len(); - let mut field_details = fields.get_mut(i).unwrap(); + let field_details = fields.get_mut(i).unwrap(); for field_value in field_values { // tokenize text let terms = tokenizer(field_value); From a763ababfe036877db65ed764c8d1cacf8032ecf Mon Sep 17 00:00:00 2001 From: muji Date: Thu, 8 Feb 2024 15:26:30 +0800 Subject: [PATCH 2/3] Fix clippy warning. --- src/query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/query.rs b/src/query.rs index 254b87b..7ccdeab 100644 --- a/src/query.rs +++ b/src/query.rs @@ -18,9 +18,9 @@ impl Index { /// Performs a search with a simple free text query. /// /// All token separators work as a disjunction operator. - pub fn query<'a, M, S: ScoreCalculator>( + pub fn query>( &self, - query: &'a str, + query: &str, score_calculator: &mut S, tokenizer: Tokenizer, fields_boost: &[f64], From c6a22576f6cd0c0ad16b7f86c516b90b6068ee27 Mon Sep 17 00:00:00 2001 From: muji Date: Thu, 8 Feb 2024 15:27:18 +0800 Subject: [PATCH 3/3] Update to 2.0.0 version for release. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a7be35e..96e8eb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "probly-search" description = "A lightweight full-text search engine with a fully customizable scoring function" -version = "2.0.0-alpha-2" +version = "2.0.0" authors = ["marcus-pousette "] edition = "2021" license = "MIT"