Skip to content

Commit 7c7f428

Browse files
meili-bors[bot]meili-botcurquiza
authored
Merge #544
544: Changes related to the next Meilisearch release (v1.7.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#296 This PR: - gathers the changes related to the next Meilisearch release (v1.7.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases). - might eventually contain test failures until the Meilisearch v1.7.0 is out. ⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.7.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._ Co-authored-by: meili-bot <[email protected]> Co-authored-by: curquiza <[email protected]> Co-authored-by: Clémentine U. - curqui <[email protected]>
2 parents 3d177b6 + 9d86c7c commit 7c7f428

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

.code-samples.meilisearch.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,6 @@ get_experimental_features_1: |-
15951595
update_experimental_features_1: |-
15961596
let client = Client::new("http://localhost:7700", Some("apiKey"));
15971597
let mut features = ExperimentalFeatures::new(&client);
1598-
features.set_score_details(true);
15991598
features.set_vector_store(true);
16001599
let res = features
16011600
.update()

src/features.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use serde::{Deserialize, Serialize};
88
#[derive(Clone, Debug, Deserialize)]
99
#[serde(rename_all = "camelCase")]
1010
pub struct ExperimentalFeaturesResult {
11-
pub score_details: bool,
1211
pub vector_store: bool,
1312
}
1413

@@ -24,16 +23,14 @@ pub struct ExperimentalFeaturesResult {
2423
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
2524
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
2625
/// let mut features = ExperimentalFeatures::new(&client);
27-
/// features.set_score_details(true);
26+
/// features.set_vector_store(true);
2827
/// ```
2928
#[derive(Debug, Serialize)]
3029
#[serde(rename_all = "camelCase")]
3130
pub struct ExperimentalFeatures<'a> {
3231
#[serde(skip_serializing)]
3332
client: &'a Client,
3433
#[serde(skip_serializing_if = "Option::is_none")]
35-
pub score_details: Option<bool>,
36-
#[serde(skip_serializing_if = "Option::is_none")]
3734
pub vector_store: Option<bool>,
3835
}
3936

@@ -42,16 +39,10 @@ impl<'a> ExperimentalFeatures<'a> {
4239
pub fn new(client: &'a Client) -> Self {
4340
ExperimentalFeatures {
4441
client,
45-
score_details: None,
4642
vector_store: None,
4743
}
4844
}
4945

50-
pub fn set_score_details(&mut self, score_details: bool) -> &mut Self {
51-
self.score_details = Some(score_details);
52-
self
53-
}
54-
5546
pub fn set_vector_store(&mut self, vector_store: bool) -> &mut Self {
5647
self.vector_store = Some(vector_store);
5748
self
@@ -92,7 +83,7 @@ impl<'a> ExperimentalFeatures<'a> {
9283
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
9384
/// futures::executor::block_on(async move {
9485
/// let mut features = ExperimentalFeatures::new(&client);
95-
/// features.set_score_details(true);
86+
/// features.set_vector_store(true);
9687
/// features.update().await.unwrap();
9788
/// });
9889
/// ```
@@ -118,26 +109,14 @@ mod tests {
118109
#[meilisearch_test]
119110
async fn test_experimental_features_get(client: Client) {
120111
let mut features = ExperimentalFeatures::new(&client);
121-
features.set_score_details(false);
122112
features.set_vector_store(false);
123113
let _ = features.update().await.unwrap();
124114

125115
let res = features.get().await.unwrap();
126116

127-
assert!(!res.score_details);
128117
assert!(!res.vector_store);
129118
}
130119

131-
#[meilisearch_test]
132-
async fn test_experimental_features_enable_score_details(client: Client) {
133-
let mut features = ExperimentalFeatures::new(&client);
134-
features.set_score_details(true);
135-
136-
let res = features.update().await.unwrap();
137-
138-
assert!(res.score_details);
139-
}
140-
141120
#[meilisearch_test]
142121
async fn test_experimental_features_enable_vector_store(client: Client) {
143122
let mut features = ExperimentalFeatures::new(&client);

0 commit comments

Comments
 (0)