mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
create a char map diring highlighting
This commit is contained in:
parent
3a3acd5126
commit
6870c45285
@ -243,9 +243,10 @@ pub fn perform_search(
|
|||||||
&displayed_ids,
|
&displayed_ids,
|
||||||
);
|
);
|
||||||
|
|
||||||
let tokenizer = TokenizerBuilder::default().build();
|
let mut tokenizer_buidler = TokenizerBuilder::default();
|
||||||
|
tokenizer_buidler.create_char_map(true);
|
||||||
|
|
||||||
let mut formatter_builder = MatcherBuilder::new(matching_words, tokenizer);
|
let mut formatter_builder = MatcherBuilder::new(matching_words, tokenizer_buidler.build());
|
||||||
formatter_builder.crop_marker(query.crop_marker);
|
formatter_builder.crop_marker(query.crop_marker);
|
||||||
formatter_builder.highlight_prefix(query.highlight_pre_tag);
|
formatter_builder.highlight_prefix(query.highlight_pre_tag);
|
||||||
formatter_builder.highlight_suffix(query.highlight_post_tag);
|
formatter_builder.highlight_suffix(query.highlight_post_tag);
|
||||||
|
Loading…
Reference in New Issue
Block a user