mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	Merge #1686
1686: Bump milli r=curquiza a=irevoire fixes #1685, #1678, #1671, #1677 and #1680 Co-authored-by: Tamo <tamo@meilisearch.com>
This commit is contained in:
		| @@ -50,7 +50,7 @@ main_error = "0.1.0" | ||||
| meilisearch-error = { path = "../meilisearch-error" } | ||||
| meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" } | ||||
| memmap = "0.7.0" | ||||
| milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.12.0" } | ||||
| milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.13.0" } | ||||
| mime = "0.3.16" | ||||
| num_cpus = "1.13.0" | ||||
| once_cell = "1.5.2" | ||||
|   | ||||
| @@ -93,14 +93,17 @@ impl ErrorCode for MilliError<'_> { | ||||
|                     | UserError::InvalidDocumentId { .. } | ||||
|                     | UserError::InvalidStoreFile | ||||
|                     | UserError::NoSpaceLeftOnDevice | ||||
|                     | UserError::InvalidAscDescSyntax { .. } | ||||
|                     | UserError::DocumentLimitReached => Code::Internal, | ||||
|                     UserError::AttributeLimitReached => Code::MaxFieldsLimitExceeded, | ||||
|                     UserError::InvalidFilter(_) => Code::Filter, | ||||
|                     UserError::InvalidFilterAttribute(_) => Code::Filter, | ||||
|                     UserError::InvalidSortName { .. } => Code::Sort, | ||||
|                     UserError::MissingDocumentId { .. } => Code::MissingDocumentId, | ||||
|                     UserError::MissingPrimaryKey => Code::MissingPrimaryKey, | ||||
|                     UserError::PrimaryKeyCannotBeChanged => Code::PrimaryKeyAlreadyPresent, | ||||
|                     UserError::PrimaryKeyCannotBeReset => Code::PrimaryKeyAlreadyPresent, | ||||
|                     UserError::SortRankingRuleMissing => Code::Sort, | ||||
|                     UserError::UnknownInternalDocumentId { .. } => Code::DocumentNotFound, | ||||
|                     UserError::InvalidFacetsDistribution { .. } => Code::BadRequest, | ||||
|                     UserError::InvalidSortableAttribute { .. } => Code::Sort, | ||||
|   | ||||
| @@ -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())), | ||||
|             }; | ||||
|  | ||||
|   | ||||
| @@ -16,9 +16,9 @@ static DEFAULT_SETTINGS_VALUES: Lazy<HashMap<&'static str, Value>> = Lazy::new(| | ||||
|         json!([ | ||||
|             "words", | ||||
|             "typo", | ||||
|             "sort", | ||||
|             "proximity", | ||||
|             "attribute", | ||||
|             "sort", | ||||
|             "exactness" | ||||
|         ]), | ||||
|     ); | ||||
| @@ -53,9 +53,9 @@ async fn get_settings() { | ||||
|         json!([ | ||||
|             "words", | ||||
|             "typo", | ||||
|             "sort", | ||||
|             "proximity", | ||||
|             "attribute", | ||||
|             "sort", | ||||
|             "exactness" | ||||
|         ]) | ||||
|     ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user