mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-26 14:40:05 +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(),
|
||||
};
|
||||
|
||||
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("<mark>".to_string());
|
||||
matcher_builder.highlight_suffix("</mark>".to_string());
|
||||
let highlighter = Highlighter::new(matcher_builder);
|
||||
|
Loading…
x
Reference in New Issue
Block a user