diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index e5aaf948..e7791192 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -1595,7 +1595,6 @@ get_experimental_features_1: |- update_experimental_features_1: |- let client = Client::new("http://localhost:7700", Some("apiKey")); let mut features = ExperimentalFeatures::new(&client); - features.set_score_details(true); features.set_vector_store(true); let res = features .update() diff --git a/src/features.rs b/src/features.rs index 6181060b..3f1ac91f 100644 --- a/src/features.rs +++ b/src/features.rs @@ -8,7 +8,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExperimentalFeaturesResult { - pub score_details: bool, pub vector_store: bool, } @@ -24,7 +23,7 @@ pub struct ExperimentalFeaturesResult { /// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey"); /// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)); /// let mut features = ExperimentalFeatures::new(&client); -/// features.set_score_details(true); +/// features.set_vector_store(true); /// ``` #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] @@ -32,8 +31,6 @@ pub struct ExperimentalFeatures<'a> { #[serde(skip_serializing)] client: &'a Client, #[serde(skip_serializing_if = "Option::is_none")] - pub score_details: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub vector_store: Option, } @@ -42,16 +39,10 @@ impl<'a> ExperimentalFeatures<'a> { pub fn new(client: &'a Client) -> Self { ExperimentalFeatures { client, - score_details: None, vector_store: None, } } - pub fn set_score_details(&mut self, score_details: bool) -> &mut Self { - self.score_details = Some(score_details); - self - } - pub fn set_vector_store(&mut self, vector_store: bool) -> &mut Self { self.vector_store = Some(vector_store); self @@ -92,7 +83,7 @@ impl<'a> ExperimentalFeatures<'a> { /// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)); /// futures::executor::block_on(async move { /// let mut features = ExperimentalFeatures::new(&client); - /// features.set_score_details(true); + /// features.set_vector_store(true); /// features.update().await.unwrap(); /// }); /// ``` @@ -118,26 +109,14 @@ mod tests { #[meilisearch_test] async fn test_experimental_features_get(client: Client) { let mut features = ExperimentalFeatures::new(&client); - features.set_score_details(false); features.set_vector_store(false); let _ = features.update().await.unwrap(); let res = features.get().await.unwrap(); - assert!(!res.score_details); assert!(!res.vector_store); } - #[meilisearch_test] - async fn test_experimental_features_enable_score_details(client: Client) { - let mut features = ExperimentalFeatures::new(&client); - features.set_score_details(true); - - let res = features.update().await.unwrap(); - - assert!(res.score_details); - } - #[meilisearch_test] async fn test_experimental_features_enable_vector_store(client: Client) { let mut features = ExperimentalFeatures::new(&client);