Replace the legacy Settings::execute by the new one

This commit is contained in:
ManyTheFish
2025-06-25 11:48:58 +02:00
parent 3aa6c3c750
commit 82fe80b360
14 changed files with 137 additions and 41 deletions

View File

@ -1,3 +1,4 @@
use milli::progress::Progress;
use milli::update::{IndexerConfig, Settings};
use milli::{Criterion, Index, Search, TermsMatchingStrategy};
@ -10,7 +11,7 @@ fn set_stop_words(index: &Index, stop_words: &[&str]) {
let mut builder = Settings::new(&mut wtxn, index, &config);
let stop_words = stop_words.iter().map(|s| s.to_string()).collect();
builder.set_stop_words(stop_words);
builder.execute(|_| (), || false, Default::default()).unwrap();
builder.execute(&|| false, &Progress::default()).unwrap();
wtxn.commit().unwrap();
}