Skip to content

web search done right

Forgot to add serde defaults to the new snippet config fields...

Mikkel Denkerbe7bbd02fcfd
diff --git a/crates/core/src/config/mod.rs b/crates/core/src/config/mod.rs
index 11f4bf7a..822b11a4 100644
--- a/crates/core/src/config/mod.rs
+++ b/crates/core/src/config/mod.rs
@@ -236,9 +236,13 @@ pub struct SnippetConfig {
pub max_considered_words: Option<usize>,
pub num_words_for_lang_detection: Option<usize>,
+ #[serde(default = "defaults::Snippet::empty_query_snippet_words")]
pub empty_query_snippet_words: usize,
+ #[serde(default = "defaults::Snippet::min_description_words")]
pub min_description_words: usize,
+ #[serde(default = "defaults::Snippet::min_body_length")]
pub min_body_length: usize,
+ #[serde(default = "defaults::Snippet::min_body_length_homepage")]
pub min_body_length_homepage: usize,
}