@@ -69,37 +69,37 @@ get_settings_1: |-
6969 let settings: Settings = movies.get_settings().await.unwrap();
7070update_settings_1 : |-
7171 let mut synonyms = std::collections::HashMap::new();
72- synonyms.insert(String::from("wolverine"), vec![String::from( "xmen"), String::from( "logan") ]);
73- synonyms.insert(String::from("logan"), vec![String::from( "wolverine") ]);
72+ synonyms.insert(String::from("wolverine"), vec!["xmen", "logan"]);
73+ synonyms.insert(String::from("logan"), vec!["wolverine"]);
7474
7575 let settings = Settings::new()
76- .with_ranking_rules(vec! [
77- "typo".to_string() ,
78- "words".to_string() ,
79- "proximity".to_string() ,
80- "attribute".to_string() ,
81- "wordsPosition".to_string() ,
82- "exactness".to_string() ,
83- "desc(release_date)".to_string() ,
84- "desc(rank)".to_string()
85- ])
86- .with_distinct_attribute("movie_id".to_string() )
87- .with_searchable_attributes(vec! [
88- "title".to_string() ,
89- "description".to_string() ,
90- "genre".to_string()
91- ])
92- .with_displayed_attributes(vec! [
93- "title".to_string() ,
94- "description".to_string() ,
95- "genre".to_string() ,
96- "release_date".to_string()
97- ])
98- .with_stop_words(vec! [
99- "the".to_string() ,
100- "a".to_string() ,
101- "an".to_string()
102- ])
76+ .with_ranking_rules(& [
77+ "typo",
78+ "words",
79+ "proximity",
80+ "attribute",
81+ "wordsPosition",
82+ "exactness",
83+ "desc(release_date)",
84+ "desc(rank)"
85+ ][..] )
86+ .with_distinct_attribute("movie_id")
87+ .with_searchable_attributes(& [
88+ "title",
89+ "description",
90+ "genre"
91+ ][..] )
92+ .with_displayed_attributes(& [
93+ "title",
94+ "description",
95+ "genre",
96+ "release_date"
97+ ][..] )
98+ .with_stop_words(& [
99+ "the",
100+ "a",
101+ "an"
102+ ][..] )
103103 .with_synonyms(synonyms);
104104
105105 let progress: Progress = movies.set_settings(&settings).await.unwrap();
0 commit comments