mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Merge #3749
3749: Fix back: sort error message r=ManyTheFish a=ManyTheFish This PR reintroduces the error message modified in https://github.com/meilisearch/milli/pull/375. However, this added double-quotes around `sort` in the message. I don't think another message contains double-quotes, so I have added a separate commit replacing the double-quotes with back-ticks, which seems more consistent with the other error messages, this last change can be reverted easily. ## Detailed changes #### v1.2-rc0 ``` The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time. ``` #### [Reintroduce fix (previous and expected behavior)](23d1c86825
) ``` You must specify where "sort" is listed in the rankingRules setting to use the sort parameter at search time ``` #### [Replace double-quotes with back-ticks (my suggestion)](4d691d071a
) ``` You must specify where `sort` is listed in the rankingRules setting to use the sort parameter at search time ``` ## Related Fixes #3722 ## Reviewers - technical review: `@irevoire` - to validate the replacement: `@macraig` Co-authored-by: ManyTheFish <many@meilisearch.com>
This commit is contained in:
commit
bf66e97b48
@ -946,7 +946,7 @@ async fn sort_unset_ranking_rule() {
|
||||
index.wait_task(1).await;
|
||||
|
||||
let expected_response = json!({
|
||||
"message": "The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time.",
|
||||
"message": "You must specify where `sort` is listed in the rankingRules setting to use the sort parameter at search time",
|
||||
"code": "invalid_search_sort",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_search_sort"
|
||||
|
@ -126,7 +126,7 @@ only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and undersco
|
||||
InvalidSortableAttribute { field: String, valid_fields: BTreeSet<String> },
|
||||
#[error("{}", HeedError::BadOpenOptions)]
|
||||
InvalidLmdbOpenOptions,
|
||||
#[error("The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time.")]
|
||||
#[error("You must specify where `sort` is listed in the rankingRules setting to use the sort parameter at search time")]
|
||||
SortRankingRuleMissing,
|
||||
#[error("The database file is in an invalid state.")]
|
||||
InvalidStoreFile,
|
||||
|
Loading…
Reference in New Issue
Block a user