mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-25 14:10:06 +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,
|
"_exact" => RankingRule::Exact,
|
||||||
_ => {
|
_ => {
|
||||||
let captures = RANKING_RULE_REGEX.lock().unwrap().captures(&rule).unwrap();
|
let captures = RANKING_RULE_REGEX.lock().unwrap().captures(&rule).unwrap();
|
||||||
match captures[0].as_ref() {
|
match captures[1].as_ref() {
|
||||||
"asc" => RankingRule::Asc(captures[1].to_string()),
|
"asc" => RankingRule::Asc(captures[2].to_string()),
|
||||||
"dsc" => RankingRule::Dsc(captures[1].to_string()),
|
"dsc" => RankingRule::Dsc(captures[2].to_string()),
|
||||||
_ => continue
|
_ => continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user