mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Differentiate between document sort error and search sort error
This commit is contained in:
parent
8aacd6374a
commit
283944ea89
7 changed files with 20 additions and 16 deletions
|
@ -663,7 +663,7 @@ fn documents_by_query(
|
|||
let sorts: Vec<_> = match sort.iter().map(|s| milli::AscDesc::from_str(s)).collect() {
|
||||
Ok(sorts) => sorts,
|
||||
Err(asc_desc_error) => {
|
||||
return Err(milli::Error::from(milli::SortError::from(asc_desc_error)).into())
|
||||
return Err(milli::SortError::from(asc_desc_error).into_documents_error().into())
|
||||
}
|
||||
};
|
||||
Some(sorts)
|
||||
|
|
|
@ -745,10 +745,9 @@ impl SearchByIndex {
|
|||
match sort.iter().map(|s| milli::AscDesc::from_str(s)).collect() {
|
||||
Ok(sorts) => sorts,
|
||||
Err(asc_desc_error) => {
|
||||
return Err(milli::Error::from(milli::SortError::from(
|
||||
asc_desc_error,
|
||||
))
|
||||
.into())
|
||||
return Err(milli::SortError::from(asc_desc_error)
|
||||
.into_search_error()
|
||||
.into())
|
||||
}
|
||||
};
|
||||
Some(sorts)
|
||||
|
|
|
@ -1060,7 +1060,7 @@ pub fn prepare_search<'t>(
|
|||
let sort = match sort.iter().map(|s| AscDesc::from_str(s)).collect() {
|
||||
Ok(sorts) => sorts,
|
||||
Err(asc_desc_error) => {
|
||||
return Err(milli::Error::from(SortError::from(asc_desc_error)).into())
|
||||
return Err(SortError::from(asc_desc_error).into_search_error().into())
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue