Move embedder stats out of progress

This commit is contained in:
Mubelotix
2025-06-23 15:24:14 +02:00
parent 4cadc8113b
commit 4925b30196
30 changed files with 255 additions and 69 deletions

View File

@ -46,7 +46,7 @@ fn test_typo_tolerance_one_typo() {
let config = IndexerConfig::default();
let mut builder = Settings::new(&mut txn, &index, &config);
builder.set_min_word_len_one_typo(4);
builder.execute(|_| (), || false, None).unwrap();
builder.execute(|_| (), || false, Default::default()).unwrap();
// typo is now supported for 4 letters words
let mut search = Search::new(&txn, &index);
@ -92,7 +92,7 @@ fn test_typo_tolerance_two_typo() {
let config = IndexerConfig::default();
let mut builder = Settings::new(&mut txn, &index, &config);
builder.set_min_word_len_two_typos(7);
builder.execute(|_| (), || false, None).unwrap();
builder.execute(|_| (), || false, Default::default()).unwrap();
// typo is now supported for 4 letters words
let mut search = Search::new(&txn, &index);
@ -153,6 +153,7 @@ fn test_typo_disabled_on_word() {
embedders,
&|| false,
&Progress::default(),
Default::default(),
)
.unwrap();
@ -180,7 +181,7 @@ fn test_typo_disabled_on_word() {
// `zealand` doesn't allow typos anymore
exact_words.insert("zealand".to_string());
builder.set_exact_words(exact_words);
builder.execute(|_| (), || false, None).unwrap();
builder.execute(|_| (), || false, Default::default()).unwrap();
let mut search = Search::new(&txn, &index);
search.query("zealand");
@ -218,7 +219,7 @@ fn test_disable_typo_on_attribute() {
let mut builder = Settings::new(&mut txn, &index, &config);
// disable typos on `description`
builder.set_exact_attributes(vec!["description".to_string()].into_iter().collect());
builder.execute(|_| (), || false, None).unwrap();
builder.execute(|_| (), || false, Default::default()).unwrap();
let mut search = Search::new(&txn, &index);
search.query("antebelum");