mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
feat: Multiword rewrite while there is time
This commit is contained in:
parent
7dc9ea78fa
commit
67302d09f3
@ -239,6 +239,12 @@ fn multiword_rewrite_matches(
|
|||||||
// for each attribute of each document
|
// for each attribute of each document
|
||||||
for same_document_attribute in matches.linear_group_by_key(|(id, m)| (*id, m.attribute)) {
|
for same_document_attribute in matches.linear_group_by_key(|(id, m)| (*id, m.attribute)) {
|
||||||
|
|
||||||
|
let elapsed = start.elapsed();
|
||||||
|
if elapsed > Duration::from_millis(10) {
|
||||||
|
info!("abort multiword rewrite after {:.2?}", elapsed);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// padding will only be applied
|
// padding will only be applied
|
||||||
// to word indices in the same attribute
|
// to word indices in the same attribute
|
||||||
let mut padding = 0;
|
let mut padding = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user