mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
add comments to integration test
This commit is contained in:
parent
1810927dbd
commit
59e41d98e3
@ -181,6 +181,7 @@ fn test_disable_typo_on_attribute() {
|
|||||||
let txn = index.read_txn().unwrap();
|
let txn = index.read_txn().unwrap();
|
||||||
|
|
||||||
let mut search = Search::new(&txn, &index);
|
let mut search = Search::new(&txn, &index);
|
||||||
|
// typo in `antebel(l)um`
|
||||||
search.query("antebelum");
|
search.query("antebelum");
|
||||||
search.limit(10);
|
search.limit(10);
|
||||||
search.authorize_typos(true);
|
search.authorize_typos(true);
|
||||||
@ -194,10 +195,10 @@ fn test_disable_typo_on_attribute() {
|
|||||||
|
|
||||||
let config = IndexerConfig::default();
|
let config = IndexerConfig::default();
|
||||||
let mut builder = Settings::new(&mut txn, &index, &config);
|
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.set_exact_attributes(vec!["description".to_string()].into_iter().collect());
|
||||||
builder.execute(|_| ()).unwrap();
|
builder.execute(|_| ()).unwrap();
|
||||||
|
|
||||||
// typo is now supported for 4 letters words
|
|
||||||
let mut search = Search::new(&txn, &index);
|
let mut search = Search::new(&txn, &index);
|
||||||
search.query("antebelum");
|
search.query("antebelum");
|
||||||
search.limit(10);
|
search.limit(10);
|
||||||
|
Loading…
Reference in New Issue
Block a user