bump milli

This commit is contained in:
Tamo 2021-09-08 16:54:39 +02:00
parent 33514b28be
commit 49c918defa
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
5 changed files with 18 additions and 85 deletions

View file

@ -6,7 +6,7 @@ use either::Either;
use heed::RoTxn;
use indexmap::IndexMap;
use meilisearch_tokenizer::{Analyzer, AnalyzerConfig, Token};
use milli::{AscDesc, FieldId, FieldsIdsMap, FilterCondition, MatchingWords};
use milli::{AscDesc, FieldId, FieldsIdsMap, FilterCondition, MatchingWords, UserError};
use serde::{Deserialize, Serialize};
use serde_json::Value;
@ -110,6 +110,11 @@ impl Index {
if let Some(ref sort) = query.sort {
let sort = match sort.iter().map(|s| AscDesc::from_str(s)).collect() {
Ok(sorts) => sorts,
Err(UserError::InvalidAscDescSyntax { name }) => {
return Err(IndexError::Milli(
UserError::InvalidSortName { name }.into(),
))
}
Err(err) => return Err(IndexError::Milli(err.into())),
};