From 7a6f583b1fafd2b413d0c7422a3a84049c8d8ebe Mon Sep 17 00:00:00 2001 From: Quentin de Quelen Date: Sat, 18 Jan 2020 19:00:19 +0100 Subject: [PATCH] fix issue on ranking rules --- meilisearch-core/src/settings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch-core/src/settings.rs b/meilisearch-core/src/settings.rs index 8e7ab3dc6..0af1c83b4 100644 --- a/meilisearch-core/src/settings.rs +++ b/meilisearch-core/src/settings.rs @@ -40,9 +40,9 @@ impl Into 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 } }