From 2cb43fa638e461575cedd52d977bf4876bd87f90 Mon Sep 17 00:00:00 2001 From: charlotte Date: Tue, 19 Nov 2019 18:21:44 +0100 Subject: [PATCH] Removed stop words from settings route --- meilidb-http/src/routes/setting.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/meilidb-http/src/routes/setting.rs b/meilidb-http/src/routes/setting.rs index 9c3a05f46..5e472e780 100644 --- a/meilidb-http/src/routes/setting.rs +++ b/meilidb-http/src/routes/setting.rs @@ -1,4 +1,4 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; use http::StatusCode; use serde::{Deserialize, Serialize}; @@ -14,7 +14,6 @@ use crate::Data; #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct SettingBody { - pub stop_words: Option, pub ranking_order: Option, pub distinct_field: Option, pub ranking_rules: Option, @@ -27,7 +26,6 @@ pub enum RankingOrdering { Dsc, } -pub type StopWords = HashSet; pub type RankingOrder = Vec; pub type DistinctField = String; pub type RankingRules = HashMap; @@ -62,10 +60,6 @@ pub async fn update(mut ctx: Context) -> SResult { None => SettingBody::default(), }; - if let Some(stop_words) = settings.stop_words { - current_settings.stop_words = Some(stop_words); - } - if let Some(ranking_order) = settings.ranking_order { current_settings.ranking_order = Some(ranking_order); }