mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Implements the get and delete tasks route
This commit is contained in:
parent
f00a285a6d
commit
742d0ee531
25 changed files with 1787 additions and 85 deletions
|
@ -2,6 +2,7 @@ use std::collections::HashMap;
|
|||
|
||||
use charabia::Language;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::fields_ids_map::FieldsIdsMap;
|
||||
use crate::FieldId;
|
||||
|
@ -14,9 +15,10 @@ use crate::FieldId;
|
|||
/// The pattern `attribute_name*` matches any attribute name that starts with `attribute_name`.
|
||||
/// The pattern `*attribute_name` matches any attribute name that ends with `attribute_name`.
|
||||
/// The pattern `*attribute_name*` matches any attribute name that contains `attribute_name`.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)]
|
||||
pub struct LocalizedAttributesRule {
|
||||
pub attribute_patterns: Vec<String>,
|
||||
#[schema(value_type = Vec<String>)]
|
||||
pub locales: Vec<Language>,
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use itertools::{EitherOrBoth, Itertools};
|
|||
use roaring::RoaringBitmap;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use time::OffsetDateTime;
|
||||
use utoipa::{PartialSchema, ToSchema};
|
||||
|
||||
use super::del_add::DelAddOperation;
|
||||
use super::index_documents::{IndexDocumentsConfig, Transform};
|
||||
|
@ -40,6 +41,18 @@ pub enum Setting<T> {
|
|||
NotSet,
|
||||
}
|
||||
|
||||
impl<T: ToSchema> ToSchema for Setting<T> {
|
||||
fn name() -> std::borrow::Cow<'static, str> {
|
||||
T::name()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: PartialSchema> PartialSchema for Setting<T> {
|
||||
fn schema() -> utoipa::openapi::RefOr<utoipa::openapi::schema::Schema> {
|
||||
T::schema()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, E> Deserr<E> for Setting<T>
|
||||
where
|
||||
T: Deserr<E>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue