mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
Rename the Exact criterion into Exactness
This commit is contained in:
committed by
Clément Renault
parent
8e6560d102
commit
9d167c08f4
@ -93,7 +93,7 @@ pub enum RankingRule {
|
||||
Proximity,
|
||||
Attribute,
|
||||
WordsPosition,
|
||||
Exact,
|
||||
Exactness,
|
||||
Asc(String),
|
||||
Dsc(String),
|
||||
}
|
||||
@ -106,7 +106,7 @@ impl ToString for RankingRule {
|
||||
RankingRule::Proximity => "_proximity".to_string(),
|
||||
RankingRule::Attribute => "_attribute".to_string(),
|
||||
RankingRule::WordsPosition => "_words_position".to_string(),
|
||||
RankingRule::Exact => "_exact".to_string(),
|
||||
RankingRule::Exactness => "_exactness".to_string(),
|
||||
RankingRule::Asc(field) => format!("asc({})", field),
|
||||
RankingRule::Dsc(field) => format!("dsc({})", field),
|
||||
}
|
||||
@ -123,7 +123,7 @@ impl FromStr for RankingRule {
|
||||
"_proximity" => RankingRule::Proximity,
|
||||
"_attribute" => RankingRule::Attribute,
|
||||
"_words_position" => RankingRule::WordsPosition,
|
||||
"_exact" => RankingRule::Exact,
|
||||
"_exactness" => RankingRule::Exactness,
|
||||
_ => {
|
||||
let captures = RANKING_RULE_REGEX.captures(s).ok_or(RankingRuleConversionError)?;
|
||||
match (captures.get(1).map(|m| m.as_str()), captures.get(2)) {
|
||||
|
Reference in New Issue
Block a user