Move geosort code out of search

This commit is contained in:
Mubelotix 2025-06-30 13:12:00 +02:00
parent 63827bbee0
commit e35d58b531
No known key found for this signature in database
GPG key ID: 0406DF6C3A69B942
10 changed files with 257 additions and 243 deletions

View file

@ -641,16 +641,12 @@ fn documents_by_query(
};
let sort_criteria = if let Some(sort) = &sort {
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())
}
};
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())
}
};
Some(sorts)
} else {
None