mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
write and test the compat layer from v3 to v4
This commit is contained in:
parent
089106a970
commit
22ffbf3676
17 changed files with 1791 additions and 39 deletions
|
@ -153,6 +153,8 @@ pub enum Code {
|
|||
InvalidApiKeyIndexes,
|
||||
InvalidApiKeyExpiresAt,
|
||||
InvalidApiKeyDescription,
|
||||
|
||||
UnretrievableErrorCode,
|
||||
}
|
||||
|
||||
impl Code {
|
||||
|
@ -262,6 +264,9 @@ impl Code {
|
|||
InvalidMinWordLengthForTypo => {
|
||||
ErrCode::invalid("invalid_min_word_length_for_typo", StatusCode::BAD_REQUEST)
|
||||
}
|
||||
UnretrievableErrorCode => {
|
||||
ErrCode::invalid("unretrievable_error_code", StatusCode::BAD_REQUEST)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,10 +19,7 @@ use crate::{IndexMetadata, Result, Version};
|
|||
|
||||
use self::meta::{DumpMeta, IndexUuid};
|
||||
|
||||
use super::{
|
||||
compat::v4_to_v5::CompatV4ToV5, /* compat::v4_to_v5::CompatV4ToV5, */ DumpReader,
|
||||
IndexReader,
|
||||
};
|
||||
use super::{compat::v4_to_v5::CompatV4ToV5, DumpReader, IndexReader};
|
||||
|
||||
pub type Document = serde_json::Map<String, serde_json::Value>;
|
||||
pub type Settings<T> = settings::Settings<T>;
|
||||
|
@ -51,7 +48,7 @@ pub type IndexUid = meta::IndexUid;
|
|||
|
||||
// everything related to the errors
|
||||
pub type ResponseError = errors::ResponseError;
|
||||
pub type Code = meilisearch_types::error::Code;
|
||||
pub type Code = errors::Code;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue