Differentiate between document sort error and search sort error

This commit is contained in:
Mubelotix 2025-07-01 12:03:50 +02:00
parent 8aacd6374a
commit 283944ea89
No known key found for this signature in database
GPG key ID: 0406DF6C3A69B942
7 changed files with 20 additions and 16 deletions

View file

@ -483,7 +483,8 @@ impl ErrorCode for milli::Error {
UserError::InvalidVectorsMapType { .. }
| UserError::InvalidVectorsEmbedderConf { .. } => Code::InvalidVectorsType,
UserError::TooManyVectors(_, _) => Code::TooManyVectors,
UserError::SortError(_) => Code::InvalidSearchSort,
UserError::SortError { search: true, .. } => Code::InvalidSearchSort,
UserError::SortError { search: false, .. } => Code::InvalidDocumentSort,
UserError::InvalidMinTypoWordLenSetting(_, _) => {
Code::InvalidSettingsTypoTolerance
}