mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 17:14:59 +08:00
reformat
This commit is contained in:
parent
aca707413c
commit
b1bf7d4f40
@ -18,10 +18,10 @@ use crate::search::{word_derivations, WordDerivationsCache};
|
|||||||
use crate::{DocumentId, FieldId, Index, Result, TreeLevel};
|
use crate::{DocumentId, FieldId, Index, Result, TreeLevel};
|
||||||
|
|
||||||
mod asc_desc;
|
mod asc_desc;
|
||||||
mod geo;
|
|
||||||
mod attribute;
|
mod attribute;
|
||||||
mod exactness;
|
mod exactness;
|
||||||
pub mod r#final;
|
pub mod r#final;
|
||||||
|
mod geo;
|
||||||
mod initial;
|
mod initial;
|
||||||
mod proximity;
|
mod proximity;
|
||||||
mod typo;
|
mod typo;
|
||||||
@ -292,25 +292,24 @@ impl<'t> CriteriaBuilder<'t> {
|
|||||||
Some(ref sort_criteria) => {
|
Some(ref sort_criteria) => {
|
||||||
for asc_desc in sort_criteria {
|
for asc_desc in sort_criteria {
|
||||||
criterion = match asc_desc {
|
criterion = match asc_desc {
|
||||||
AscDescName::Asc(Member::Field(field)) => {
|
AscDescName::Asc(Member::Field(field)) => Box::new(AscDesc::asc(
|
||||||
Box::new(AscDesc::asc(
|
|
||||||
&self.index,
|
&self.index,
|
||||||
&self.rtxn,
|
&self.rtxn,
|
||||||
criterion,
|
criterion,
|
||||||
field.to_string(),
|
field.to_string(),
|
||||||
)?)
|
)?),
|
||||||
}
|
AscDescName::Desc(Member::Field(field)) => Box::new(AscDesc::desc(
|
||||||
AscDescName::Desc(Member::Field(field)) => {
|
|
||||||
Box::new(AscDesc::desc(
|
|
||||||
&self.index,
|
&self.index,
|
||||||
&self.rtxn,
|
&self.rtxn,
|
||||||
criterion,
|
criterion,
|
||||||
field.to_string(),
|
field.to_string(),
|
||||||
)?)
|
)?),
|
||||||
}
|
AscDescName::Asc(Member::Geo(point)) => Box::new(Geo::new(
|
||||||
AscDescName::Asc(Member::Geo(point)) => {
|
&self.index,
|
||||||
Box::new(Geo::new(&self.index, &self.rtxn, criterion, point.clone())?)
|
&self.rtxn,
|
||||||
}
|
criterion,
|
||||||
|
point.clone(),
|
||||||
|
)?),
|
||||||
AscDescName::Desc(Member::Geo(_point)) => {
|
AscDescName::Desc(Member::Geo(_point)) => {
|
||||||
panic!("You can't desc geosort"); // TODO: TAMO: remove this
|
panic!("You can't desc geosort"); // TODO: TAMO: remove this
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user