mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 13:40:31 +01:00
return an error in case a user try to sort with :desc
This commit is contained in:
parent
4b618b95e4
commit
b15c77ebc4
@ -15,7 +15,7 @@ use super::query_tree::{Operation, PrimitiveQueryPart, Query, QueryKind};
|
||||
use crate::criterion::{AscDesc as AscDescName, Member};
|
||||
use crate::search::criteria::geo::Geo;
|
||||
use crate::search::{word_derivations, WordDerivationsCache};
|
||||
use crate::{DocumentId, FieldId, Index, Result, TreeLevel};
|
||||
use crate::{DocumentId, FieldId, Index, Result, TreeLevel, UserError};
|
||||
|
||||
mod asc_desc;
|
||||
mod attribute;
|
||||
@ -311,7 +311,7 @@ impl<'t> CriteriaBuilder<'t> {
|
||||
point.clone(),
|
||||
)?),
|
||||
AscDescName::Desc(Member::Geo(_point)) => {
|
||||
panic!("You can't desc geosort"); // TODO: TAMO: remove this
|
||||
return Err(UserError::InvalidSortName { name: "Sorting in descending order is currently not supported for the geosearch".to_string() })?
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user