mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-09 22:48:54 +01:00
Do not fail sort comparisons when the field name or target point are different
This commit is contained in:
parent
12a7a45930
commit
7fb3e378ff
@ -425,9 +425,6 @@ pub struct Sort {
|
|||||||
|
|
||||||
impl PartialOrd for Sort {
|
impl PartialOrd for Sort {
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||||
if self.field_name != other.field_name {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
if self.ascending != other.ascending {
|
if self.ascending != other.ascending {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@ -466,9 +463,6 @@ pub struct GeoSort {
|
|||||||
|
|
||||||
impl PartialOrd for GeoSort {
|
impl PartialOrd for GeoSort {
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||||
if self.target_point != other.target_point {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
if self.ascending != other.ascending {
|
if self.ascending != other.ascending {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user