From 47009615ee0ddbf6fe9d3b9903b1470ff81861c2 Mon Sep 17 00:00:00 2001 From: qdequele Date: Thu, 27 Feb 2020 14:31:08 +0100 Subject: [PATCH] rename words_position to wordsPosition; fix #483 --- meilisearch-core/src/database.rs | 2 +- meilisearch-core/src/settings.rs | 2 +- meilisearch-http/tests/common.rs | 2 +- meilisearch-http/tests/search.rs | 14 +++++++------- meilisearch-http/tests/settings.rs | 10 +++++----- meilisearch-http/tests/settings_ranking_rules.rs | 10 +++++----- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/meilisearch-core/src/database.rs b/meilisearch-core/src/database.rs index 8771807f8..3326eb9cd 100644 --- a/meilisearch-core/src/database.rs +++ b/meilisearch-core/src/database.rs @@ -1063,7 +1063,7 @@ mod tests { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)" ], diff --git a/meilisearch-core/src/settings.rs b/meilisearch-core/src/settings.rs index 5e230cdba..11344a833 100644 --- a/meilisearch-core/src/settings.rs +++ b/meilisearch-core/src/settings.rs @@ -126,7 +126,7 @@ impl FromStr for RankingRule { "words" => RankingRule::Words, "proximity" => RankingRule::Proximity, "attribute" => RankingRule::Attribute, - "words_position" => RankingRule::WordsPosition, + "wordsPosition" => RankingRule::WordsPosition, "exactness" => RankingRule::Exactness, _ => { let captures = RANKING_RULE_REGEX.captures(s).ok_or(RankingRuleConversionError)?; diff --git a/meilisearch-http/tests/common.rs b/meilisearch-http/tests/common.rs index 2ab31ab15..605caa833 100644 --- a/meilisearch-http/tests/common.rs +++ b/meilisearch-http/tests/common.rs @@ -61,7 +61,7 @@ pub fn enrich_server_with_movies_settings( "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)", diff --git a/meilisearch-http/tests/search.rs b/meilisearch-http/tests/search.rs index 20e2d9b63..b03ff4a0d 100644 --- a/meilisearch-http/tests/search.rs +++ b/meilisearch-http/tests/search.rs @@ -630,7 +630,7 @@ fn search_with_settings_basic() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)" @@ -736,7 +736,7 @@ fn search_with_settings_stop_words() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)" @@ -843,7 +843,7 @@ fn search_with_settings_synonyms() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)" @@ -955,7 +955,7 @@ fn search_with_settings_ranking_rules() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "asc(vote_average)", "exactness", "dsc(popularity)" @@ -1062,7 +1062,7 @@ fn search_with_settings_searchable_attributes() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)" @@ -1168,7 +1168,7 @@ fn search_with_settings_displayed_attributes() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)" @@ -1239,7 +1239,7 @@ fn search_with_settings_searchable_attributes_2() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "dsc(popularity)", "exactness", "dsc(vote_average)" diff --git a/meilisearch-http/tests/settings.rs b/meilisearch-http/tests/settings.rs index eccde51c9..09a8c96bd 100644 --- a/meilisearch-http/tests/settings.rs +++ b/meilisearch-http/tests/settings.rs @@ -45,7 +45,7 @@ fn write_all_and_delete() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", "dsc(rank)", @@ -131,7 +131,7 @@ fn write_all_and_delete() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness" ], "distinctAttribute": null, @@ -196,7 +196,7 @@ fn write_all_and_update() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", "dsc(rank)", @@ -262,7 +262,7 @@ fn write_all_and_update() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", ], @@ -315,7 +315,7 @@ fn write_all_and_update() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", ], diff --git a/meilisearch-http/tests/settings_ranking_rules.rs b/meilisearch-http/tests/settings_ranking_rules.rs index 73ef8c988..f221aacfb 100644 --- a/meilisearch-http/tests/settings_ranking_rules.rs +++ b/meilisearch-http/tests/settings_ranking_rules.rs @@ -43,7 +43,7 @@ fn write_all_and_delete() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", "dsc(rank)", @@ -100,7 +100,7 @@ fn write_all_and_delete() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness" ]); @@ -141,7 +141,7 @@ fn write_all_and_update() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", "dsc(rank)", @@ -178,7 +178,7 @@ fn write_all_and_update() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", ]); @@ -210,7 +210,7 @@ fn write_all_and_update() { "words", "proximity", "attribute", - "words_position", + "wordsPosition", "exactness", "dsc(release_date)", ]);