From 5943e1c3b2a128c7116cc576dddcc9b54d87de38 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Mon, 22 Aug 2022 13:55:01 +0200 Subject: [PATCH 1/3] Update log dependency --- http-ui/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-ui/Cargo.toml b/http-ui/Cargo.toml index 6d902f5b3..d809f74e3 100644 --- a/http-ui/Cargo.toml +++ b/http-ui/Cargo.toml @@ -33,7 +33,7 @@ warp = "0.3.2" # logging fst = "0.4.7" -log = "0.4.14" +log = "0.4.17" stderrlog = "0.5.1" # Temporary fix for bitvec, remove once fixed. (https://github.com/bitvecto-rs/bitvec/issues/105) From ba5ca8a3624e2889b5aa5a6408195d879846548c Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Mon, 22 Aug 2022 14:38:00 +0200 Subject: [PATCH 2/3] Upgrade charabia v0.6.0 --- milli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 1441461f3..15201d075 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -9,7 +9,7 @@ bimap = { version = "0.6.2", features = ["serde"] } bincode = "1.3.3" bstr = "0.2.17" byteorder = "1.4.3" -charabia = "0.5.1" +charabia = "0.6.0" concat-arrays = "0.1.2" crossbeam-channel = "0.5.2" either = "1.6.1" From a5b9a35c508838197b26b746b731b67ac2b1a39d Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Mon, 22 Aug 2022 14:39:16 +0200 Subject: [PATCH 3/3] Activate char_map for highlighting --- http-ui/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index c20210443..3b14889cc 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -784,8 +784,10 @@ async fn main() -> anyhow::Result<()> { None => fields_ids_map.iter().map(|(_, name)| name).map(String::from).collect(), }; - let mut matcher_builder = - MatcherBuilder::new(matching_words, TokenizerBuilder::default().build()); + let mut matcher_builder = MatcherBuilder::new( + matching_words, + TokenizerBuilder::default().create_char_map(true).build(), + ); matcher_builder.highlight_prefix("".to_string()); matcher_builder.highlight_suffix("".to_string()); let highlighter = Highlighter::new(matcher_builder);