mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-30 23:46:28 +00:00 
			
		
		
		
	write the compat layer from v2 to v3
This commit is contained in:
		| @@ -6,9 +6,9 @@ use serde::Deserialize; | ||||
| #[serde(rename_all = "camelCase")] | ||||
| pub struct ResponseError { | ||||
|     #[serde(skip)] | ||||
|     code: StatusCode, | ||||
|     message: String, | ||||
|     error_code: String, | ||||
|     error_type: String, | ||||
|     error_link: String, | ||||
|     pub code: StatusCode, | ||||
|     pub message: String, | ||||
|     pub error_code: String, | ||||
|     pub error_type: String, | ||||
|     pub error_link: String, | ||||
| } | ||||
|   | ||||
| @@ -41,7 +41,7 @@ use crate::{IndexMetadata, Result, Version}; | ||||
|  | ||||
| use self::meta::{DumpMeta, IndexUuid}; | ||||
|  | ||||
| use super::IndexReader; | ||||
| use super::{compat::v2_to_v3::CompatV2ToV3, IndexReader}; | ||||
|  | ||||
| pub type Document = serde_json::Map<String, serde_json::Value>; | ||||
| pub type Settings<T> = settings::Settings<T>; | ||||
| @@ -99,11 +99,13 @@ impl V2Reader { | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     /* | ||||
|     pub fn to_v3(self) -> CompatV2ToV3 { | ||||
|         CompatV2ToV3::new(self) | ||||
|     } | ||||
|     */ | ||||
|  | ||||
|     pub fn index_uuid(&self) -> Vec<IndexUuid> { | ||||
|         self.index_uuid.clone() | ||||
|     } | ||||
|  | ||||
|     pub fn version(&self) -> Version { | ||||
|         Version::V2 | ||||
|   | ||||
| @@ -7,8 +7,8 @@ use super::{ResponseError, Settings, Unchecked}; | ||||
| #[derive(Deserialize)] | ||||
| #[cfg_attr(test, derive(serde::Serialize))] | ||||
| pub struct UpdateEntry { | ||||
|     uuid: Uuid, | ||||
|     update: UpdateStatus, | ||||
|     pub uuid: Uuid, | ||||
|     pub update: UpdateStatus, | ||||
| } | ||||
|  | ||||
| impl UpdateEntry { | ||||
| @@ -153,7 +153,7 @@ impl Processing { | ||||
| #[serde(rename_all = "camelCase")] | ||||
| pub struct Aborted { | ||||
|     #[serde(flatten)] | ||||
|     from: Enqueued, | ||||
|     pub from: Enqueued, | ||||
|     #[serde(with = "time::serde::rfc3339")] | ||||
|     pub aborted_at: OffsetDateTime, | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user