mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-28 01:01:00 +00:00
Replace the legacy Settings::execute by the new one
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user