From ae5a04e85ce7daa0f0e7569d3c039c7681a60ab6 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 7 Jan 2025 16:24:26 +0100 Subject: [PATCH] apply review comments --- crates/meilisearch-types/src/tasks.rs | 4 ---- crates/meilisearch/src/search/mod.rs | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/meilisearch-types/src/tasks.rs b/crates/meilisearch-types/src/tasks.rs index 7960951ed..167cfcd80 100644 --- a/crates/meilisearch-types/src/tasks.rs +++ b/crates/meilisearch-types/src/tasks.rs @@ -471,10 +471,6 @@ pub enum Kind { } impl Kind { - pub fn all_variants() -> Vec { - enum_iterator::all::().collect() - } - pub fn related_to_one_index(&self) -> bool { match self { Kind::DocumentAdditionOrUpdate diff --git a/crates/meilisearch/src/search/mod.rs b/crates/meilisearch/src/search/mod.rs index 7cefb57b6..abeae55bd 100644 --- a/crates/meilisearch/src/search/mod.rs +++ b/crates/meilisearch/src/search/mod.rs @@ -673,7 +673,7 @@ pub struct SearchResult { #[serde(flatten)] pub hits_info: HitsInfo, #[serde(skip_serializing_if = "Option::is_none")] - #[schema(value_type = HashMap)] + #[schema(value_type = Option>)] pub facet_distribution: Option>>, #[serde(skip_serializing_if = "Option::is_none")] pub facet_stats: Option>, @@ -1043,7 +1043,7 @@ pub fn perform_search( #[derive(Debug, Clone, Default, Serialize, ToSchema)] pub struct ComputedFacets { - #[schema(value_type = Option>>)] + #[schema(value_type = BTreeMap>)] pub distribution: BTreeMap>, pub stats: BTreeMap, }