mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 21:20:24 +01:00
fix issue on ranking rules
This commit is contained in:
parent
e078eafb1f
commit
7a6f583b1f
@ -40,9 +40,9 @@ impl Into<SettingsUpdate> for Settings {
|
||||
"_exact" => RankingRule::Exact,
|
||||
_ => {
|
||||
let captures = RANKING_RULE_REGEX.lock().unwrap().captures(&rule).unwrap();
|
||||
match captures[0].as_ref() {
|
||||
"asc" => RankingRule::Asc(captures[1].to_string()),
|
||||
"dsc" => RankingRule::Dsc(captures[1].to_string()),
|
||||
match captures[1].as_ref() {
|
||||
"asc" => RankingRule::Asc(captures[2].to_string()),
|
||||
"dsc" => RankingRule::Dsc(captures[2].to_string()),
|
||||
_ => continue
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user