mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +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(
|
||||||
}
|
&self.index,
|
||||||
AscDescName::Desc(Member::Field(field)) => {
|
&self.rtxn,
|
||||||
Box::new(AscDesc::desc(
|
criterion,
|
||||||
&self.index,
|
field.to_string(),
|
||||||
&self.rtxn,
|
)?),
|
||||||
criterion,
|
AscDescName::Asc(Member::Geo(point)) => Box::new(Geo::new(
|
||||||
field.to_string(),
|
&self.index,
|
||||||
)?)
|
&self.rtxn,
|
||||||
}
|
criterion,
|
||||||
AscDescName::Asc(Member::Geo(point)) => {
|
point.clone(),
|
||||||
Box::new(Geo::new(&self.index, &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