mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
feat: Multiword rewrite while there is time
This commit is contained in:
parent
7dc9ea78fa
commit
67302d09f3
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue