I can index documents without meilisearch

This commit is contained in:
Irevoire 2022-09-21 12:01:46 +02:00 committed by Clément Renault
parent 7bbd75e1fb
commit 16eab7b337
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
13 changed files with 357 additions and 222 deletions

View file

@ -1,5 +1,6 @@
use anyhow::Result;
use index::{Settings, Unchecked};
use meilisearch_types::error::ResponseError;
use milli::DocumentId;
use serde::{Deserialize, Serialize, Serializer};
@ -18,16 +19,6 @@ pub enum Status {
Failed,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Error {
message: String,
code: String,
#[serde(rename = "type")]
kind: String,
link: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TaskView {
@ -38,7 +29,7 @@ pub struct TaskView {
pub kind: Kind,
pub details: Option<Details>,
pub error: Option<Error>,
pub error: Option<ResponseError>,
#[serde(serialize_with = "serialize_duration")]
pub duration: Option<Duration>,
@ -62,7 +53,7 @@ pub struct Task {
#[serde(with = "time::serde::rfc3339::option")]
pub finished_at: Option<OffsetDateTime>,
pub error: Option<Error>,
pub error: Option<ResponseError>,
pub details: Option<Details>,
pub status: Status,