mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-01 17:15:46 +01:00
Activate char_map for highlighting
This commit is contained in:
parent
ba5ca8a362
commit
a5b9a35c50
@ -784,8 +784,10 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
None => fields_ids_map.iter().map(|(_, name)| name).map(String::from).collect(),
|
None => fields_ids_map.iter().map(|(_, name)| name).map(String::from).collect(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut matcher_builder =
|
let mut matcher_builder = MatcherBuilder::new(
|
||||||
MatcherBuilder::new(matching_words, TokenizerBuilder::default().build());
|
matching_words,
|
||||||
|
TokenizerBuilder::default().create_char_map(true).build(),
|
||||||
|
);
|
||||||
matcher_builder.highlight_prefix("<mark>".to_string());
|
matcher_builder.highlight_prefix("<mark>".to_string());
|
||||||
matcher_builder.highlight_suffix("</mark>".to_string());
|
matcher_builder.highlight_suffix("</mark>".to_string());
|
||||||
let highlighter = Highlighter::new(matcher_builder);
|
let highlighter = Highlighter::new(matcher_builder);
|
||||||
|
Loading…
Reference in New Issue
Block a user