Skip to content

Commit 968dfab

Browse files
changed some rebase issues
1 parent 979d460 commit 968dfab

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

.code-samples.meilisearch.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,15 @@ search_parameter_guide_show_ranking_score_1: |-
876876
.execute()
877877
.await
878878
.unwrap();
879+
search_parameter_guide_show_ranking_score_details_1: |-
880+
let results: SearchResults<Movie> = client
881+
.index("movies")
882+
.search()
883+
.with_query("dragon")
884+
.with_show_ranking_score_details(true)
885+
.execute()
886+
.await
887+
.unwrap();
879888
search_parameter_guide_matching_strategy_1: |-
880889
let results: SearchResults<Movie> = client
881890
.index("movies")

src/settings.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -838,17 +838,17 @@ impl<Http: HttpClient> Index<Http> {
838838
.await
839839
}
840840

841-
/// Get [separator token](https://www.meilisearch.com/docs/reference/api/settings#separator-tokens) of the [Index].
841+
/// Get [separator token](https://www.meilisearch.com/docs/reference/api/settings#separator-tokens) of the [Index].
842842
///
843843
/// ```
844844
/// # use meilisearch_sdk::{client::*, indexes::*};
845-
/// # client.create_index("get_separator_tokens", None).await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
846845
/// #
847846
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
848847
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
849848
/// #
850849
/// # tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async {
851850
/// let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
851+
/// # client.create_index("get_separator_tokens", None).await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
852852
/// let index = client.index("get_separator_tokens");
853853
///
854854
/// let separator_tokens = index.get_separator_tokens().await.unwrap();
@@ -2108,7 +2108,7 @@ impl<Http: HttpClient> Index<Http> {
21082108
}
21092109

21102110
/// Reset [search cutoff](https://www.meilisearch.com/docs/reference/api/settings#search-cutoff) settings of the [Index].
2111-
///
2111+
///
21122112
/// # Example
21132113
///
21142114
/// ```
@@ -2448,6 +2448,7 @@ mod tests {
24482448
assert_eq!(expected, res);
24492449
}
24502450

2451+
#[meilisearch_test]
24512452
async fn test_get_separator_tokens(index: Index) {
24522453
let separator: Vec<&str> = vec![];
24532454
let res = index.get_separator_tokens().await.unwrap();
@@ -2457,15 +2458,12 @@ mod tests {
24572458

24582459
#[meilisearch_test]
24592460
async fn test_set_separator_tokens(client: Client, index: Index) {
2460-
let expected: Vec<String> = vec!["@".to_string(), "#".to_string()];
2461+
let expected: Vec<String> = vec!["#".to_string(), "@".to_string()];
24612462

2462-
let task_info = index
2463-
.set_separator_tokens(&expected)
2464-
.await
2465-
.unwrap();
2463+
let task_info = index.set_separator_tokens(&expected).await.unwrap();
24662464
client.wait_for_task(task_info, None, None).await.unwrap();
24672465

2468-
let mut res = index.get_separator_tokens().await.unwrap();
2466+
let res = index.get_separator_tokens().await.unwrap();
24692467

24702468
assert_eq!(expected, res);
24712469
}
@@ -2505,15 +2503,12 @@ mod tests {
25052503

25062504
#[meilisearch_test]
25072505
async fn test_set_non_separator_tokens(client: Client, index: Index) {
2508-
let expected: Vec<String> = vec![ "@".to_string(), "#".to_string()];
2506+
let expected: Vec<String> = vec!["#".to_string(), "@".to_string()];
25092507

2510-
let task_info = index
2511-
.set_non_separator_tokens(&expected)
2512-
.await
2513-
.unwrap();
2508+
let task_info = index.set_non_separator_tokens(&expected).await.unwrap();
25142509
client.wait_for_task(task_info, None, None).await.unwrap();
25152510

2516-
let mut res = index.get_non_separator_tokens().await.unwrap();
2511+
let res = index.get_non_separator_tokens().await.unwrap();
25172512

25182513
assert_eq!(expected, res);
25192514
}

0 commit comments

Comments
 (0)