diff --git a/Cargo.toml b/Cargo.toml index 87b3662..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" @@ -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); 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],