mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-26 06:46:27 +00:00
fix tests
This commit is contained in:
@ -91,7 +91,7 @@ time = { version = "0.3.41", features = [
|
|||||||
] }
|
] }
|
||||||
tokio = { version = "1.45.1", features = ["full"] }
|
tokio = { version = "1.45.1", features = ["full"] }
|
||||||
toml = "0.8.23"
|
toml = "0.8.23"
|
||||||
uuid = { version = "1.17.0", features = ["serde", "v4"] }
|
uuid = { version = "1.18.0", features = ["serde", "v4"] }
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
termcolor = "1.4.1"
|
termcolor = "1.4.1"
|
||||||
url = { version = "2.5.4", features = ["serde"] }
|
url = { version = "2.5.4", features = ["serde"] }
|
||||||
|
@ -1852,7 +1852,7 @@ async fn add_documents_with_geo_field() {
|
|||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
// we are expecting docs 4 and 3 first as they have geo
|
// we are expecting docs 4 and 3 first as they have geo
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }),
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }),
|
||||||
@r###"
|
@r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
@ -1884,7 +1884,8 @@ async fn add_documents_with_geo_field() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -1939,7 +1940,7 @@ async fn update_documents_with_geo_field() {
|
|||||||
let (response, code) = index.search_post(json!({"sort": ["_geoPoint(10,0):asc"]})).await;
|
let (response, code) = index.search_post(json!({"sort": ["_geoPoint(10,0):asc"]})).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
// we are expecting docs 4 and 3 first as they have geo
|
// we are expecting docs 4 and 3 first as they have geo
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }),
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }),
|
||||||
@r###"
|
@r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
@ -1971,7 +1972,8 @@ async fn update_documents_with_geo_field() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -2043,7 +2045,7 @@ async fn update_documents_with_geo_field() {
|
|||||||
let (response, code) = index.search_post(json!({"sort": ["_geoPoint(10,0):asc"]})).await;
|
let (response, code) = index.search_post(json!({"sort": ["_geoPoint(10,0):asc"]})).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
// the search response should not have changed: we are expecting docs 4 and 3 first as they have geo
|
// the search response should not have changed: we are expecting docs 4 and 3 first as they have geo
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }),
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }),
|
||||||
@r###"
|
@r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
@ -2076,7 +2078,8 @@ async fn update_documents_with_geo_field() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
@ -742,7 +742,7 @@ async fn vector_filter_all_embedders() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -762,9 +762,10 @@ async fn vector_filter_all_embedders() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -839,7 +840,7 @@ async fn vector_filter_specific_embedder() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -859,9 +860,10 @@ async fn vector_filter_specific_embedder() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -874,7 +876,7 @@ async fn vector_filter_user_provided() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -885,9 +887,10 @@ async fn vector_filter_user_provided() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -900,7 +903,7 @@ async fn vector_filter_specific_fragment() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -914,9 +917,10 @@ async fn vector_filter_specific_fragment() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
|
|
||||||
let (value, _code) = index
|
let (value, _code) = index
|
||||||
.search_post(json!({
|
.search_post(json!({
|
||||||
@ -924,7 +928,7 @@ async fn vector_filter_specific_fragment() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -941,9 +945,10 @@ async fn vector_filter_specific_fragment() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -976,16 +981,17 @@ async fn vector_filter_document_template_but_fragments_used() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "",
|
"query": "",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -1023,7 +1029,7 @@ async fn vector_filter_document_template() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1040,9 +1046,10 @@ async fn vector_filter_document_template() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -1075,7 +1082,7 @@ async fn vector_filter_negation() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1092,9 +1099,10 @@ async fn vector_filter_negation() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -1107,7 +1115,7 @@ async fn vector_filter_or_combination() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1124,9 +1132,10 @@ async fn vector_filter_or_combination() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -1139,7 +1148,7 @@ async fn vector_filter_regenerate() {
|
|||||||
"attributesToRetrieve": ["name"]
|
"attributesToRetrieve": ["name"]
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1156,7 +1165,8 @@ async fn vector_filter_regenerate() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ async fn geo_bounding_box_with_string_and_number() {
|
|||||||
}),
|
}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
assert_eq!(code, 200, "{response}");
|
assert_eq!(code, 200, "{response}");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -63,7 +63,8 @@ async fn geo_bounding_box_with_string_and_number() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -84,7 +85,7 @@ async fn bug_4640() {
|
|||||||
}),
|
}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
assert_eq!(code, 200, "{response}");
|
assert_eq!(code, 200, "{response}");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -123,7 +124,8 @@ async fn bug_4640() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -147,7 +149,7 @@ async fn geo_asc_with_words() {
|
|||||||
&json!({"q": "jean"}),
|
&json!({"q": "jean"}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
assert_eq!(code, 200, "{response}");
|
assert_eq!(code, 200, "{response}");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -179,7 +181,8 @@ async fn geo_asc_with_words() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -192,7 +195,7 @@ async fn geo_asc_with_words() {
|
|||||||
&json!({"q": "bob"}),
|
&json!({"q": "bob"}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
assert_eq!(code, 200, "{response}");
|
assert_eq!(code, 200, "{response}");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -216,7 +219,8 @@ async fn geo_asc_with_words() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -229,7 +233,7 @@ async fn geo_asc_with_words() {
|
|||||||
&json!({"q": "intel"}),
|
&json!({"q": "intel"}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
assert_eq!(code, 200, "{response}");
|
assert_eq!(code, 200, "{response}");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -245,7 +249,8 @@ async fn geo_asc_with_words() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -269,7 +274,7 @@ async fn geo_sort_with_words() {
|
|||||||
&json!({"q": "jean", "sort": ["_geoPoint(0.0, 0.0):asc"]}),
|
&json!({"q": "jean", "sort": ["_geoPoint(0.0, 0.0):asc"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
assert_eq!(code, 200, "{response}");
|
assert_eq!(code, 200, "{response}");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -304,7 +309,8 @@ async fn geo_sort_with_words() {
|
|||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use meili_snap::snapshot;
|
use meili_snap::{json_string, snapshot};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
use crate::common::index::Index;
|
use crate::common::index::Index;
|
||||||
@ -148,7 +148,7 @@ async fn simple_search() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response, @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -209,9 +209,10 @@ async fn simple_search() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 0
|
"semanticHitCount": 0
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
snapshot!(response["semanticHitCount"], @"0");
|
snapshot!(response["semanticHitCount"], @"0");
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
@ -220,7 +221,7 @@ async fn simple_search() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response, @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -284,9 +285,10 @@ async fn simple_search() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 2
|
"semanticHitCount": 2
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
snapshot!(response["semanticHitCount"], @"2");
|
snapshot!(response["semanticHitCount"], @"2");
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
@ -295,7 +297,7 @@ async fn simple_search() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response, @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -359,9 +361,10 @@ async fn simple_search() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 3
|
"semanticHitCount": 3
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
snapshot!(response["semanticHitCount"], @"3");
|
snapshot!(response["semanticHitCount"], @"3");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ async fn simple_search() {
|
|||||||
// english
|
// english
|
||||||
index
|
index
|
||||||
.search(json!({"q": "Atta", "attributesToRetrieve": ["id"]}), |response, code| {
|
.search(json!({"q": "Atta", "attributesToRetrieve": ["id"]}), |response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -115,7 +115,8 @@ async fn simple_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -125,7 +126,7 @@ async fn simple_search() {
|
|||||||
// japanese
|
// japanese
|
||||||
index
|
index
|
||||||
.search(json!({"q": "進撃", "attributesToRetrieve": ["id"]}), |response, code| {
|
.search(json!({"q": "進撃", "attributesToRetrieve": ["id"]}), |response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -136,7 +137,8 @@ async fn simple_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -147,7 +149,7 @@ async fn simple_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "進撃", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "進撃", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -158,9 +160,10 @@ async fn simple_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@ -169,7 +172,7 @@ async fn simple_search() {
|
|||||||
// chinese
|
// chinese
|
||||||
index
|
index
|
||||||
.search(json!({"q": "进击", "attributesToRetrieve": ["id"]}), |response, code| {
|
.search(json!({"q": "进击", "attributesToRetrieve": ["id"]}), |response, code| {
|
||||||
snapshot!(response, @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -180,9 +183,10 @@ async fn simple_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
@ -222,7 +226,7 @@ async fn force_locales() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -233,7 +237,8 @@ async fn force_locales() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -246,7 +251,7 @@ async fn force_locales() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -257,7 +262,8 @@ async fn force_locales() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -300,7 +306,7 @@ async fn force_locales_with_pattern() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -311,7 +317,8 @@ async fn force_locales_with_pattern() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -324,7 +331,7 @@ async fn force_locales_with_pattern() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -335,7 +342,8 @@ async fn force_locales_with_pattern() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -376,14 +384,15 @@ async fn force_locales_with_pattern_nested() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -396,7 +405,7 @@ async fn force_locales_with_pattern_nested() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -407,7 +416,8 @@ async fn force_locales_with_pattern_nested() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -451,14 +461,15 @@ async fn force_different_locales_with_pattern() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -471,7 +482,7 @@ async fn force_different_locales_with_pattern() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -482,7 +493,8 @@ async fn force_different_locales_with_pattern() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -529,14 +541,15 @@ async fn auto_infer_locales_at_search_with_attributes_to_search_on() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -549,7 +562,7 @@ async fn auto_infer_locales_at_search_with_attributes_to_search_on() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"], "attributesToSearchOn": ["name_zh", "description_zh"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"], "attributesToSearchOn": ["name_zh", "description_zh"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -560,7 +573,8 @@ async fn auto_infer_locales_at_search_with_attributes_to_search_on() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -602,7 +616,7 @@ async fn auto_infer_locales_at_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -613,7 +627,8 @@ async fn auto_infer_locales_at_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -625,7 +640,7 @@ async fn auto_infer_locales_at_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -636,7 +651,8 @@ async fn auto_infer_locales_at_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -648,7 +664,7 @@ async fn auto_infer_locales_at_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -659,7 +675,8 @@ async fn auto_infer_locales_at_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -702,14 +719,15 @@ async fn force_different_locales_with_pattern_nested() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -722,7 +740,7 @@ async fn force_different_locales_with_pattern_nested() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -733,7 +751,8 @@ async fn force_different_locales_with_pattern_nested() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -746,7 +765,7 @@ async fn force_different_locales_with_pattern_nested() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["ja"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["ja"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -757,7 +776,8 @@ async fn force_different_locales_with_pattern_nested() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -799,14 +819,15 @@ async fn settings_change() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -819,14 +840,15 @@ async fn settings_change() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -862,14 +884,15 @@ async fn settings_change() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["cmn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -882,14 +905,15 @@ async fn settings_change() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
json!({"q": "\"进击的巨人\"", "locales": ["jpn"], "attributesToRetrieve": ["id"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "\"进击的巨人\"",
|
"query": "\"进击的巨人\"",
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -1164,7 +1188,7 @@ async fn swedish_search() {
|
|||||||
// infer swedish
|
// infer swedish
|
||||||
index
|
index
|
||||||
.search(json!({"q": "trä", "attributesToRetrieve": ["product"]}), |response, code| {
|
.search(json!({"q": "trä", "attributesToRetrieve": ["product"]}), |response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1178,7 +1202,8 @@ async fn swedish_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -1187,7 +1212,7 @@ async fn swedish_search() {
|
|||||||
|
|
||||||
index
|
index
|
||||||
.search(json!({"q": "tra", "attributesToRetrieve": ["product"]}), |response, code| {
|
.search(json!({"q": "tra", "attributesToRetrieve": ["product"]}), |response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1201,7 +1226,8 @@ async fn swedish_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -1213,7 +1239,7 @@ async fn swedish_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "trä", "locales": ["swe"], "attributesToRetrieve": ["product"]}),
|
json!({"q": "trä", "locales": ["swe"], "attributesToRetrieve": ["product"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1227,7 +1253,8 @@ async fn swedish_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -1238,7 +1265,7 @@ async fn swedish_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "tra", "locales": ["swe"], "attributesToRetrieve": ["product"]}),
|
json!({"q": "tra", "locales": ["swe"], "attributesToRetrieve": ["product"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1252,7 +1279,8 @@ async fn swedish_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -1287,7 +1315,7 @@ async fn german_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "kulturalität", "attributesToRetrieve": ["product"]}),
|
json!({"q": "kulturalität", "attributesToRetrieve": ["product"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1298,7 +1326,8 @@ async fn german_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
@ -1310,7 +1339,7 @@ async fn german_search() {
|
|||||||
.search(
|
.search(
|
||||||
json!({"q": "organisation", "attributesToRetrieve": ["product"]}),
|
json!({"q": "organisation", "attributesToRetrieve": ["product"]}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1321,7 +1350,8 @@ async fn german_search() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
|
@ -1044,7 +1044,7 @@ async fn test_degraded_score_details() {
|
|||||||
}),
|
}),
|
||||||
|response, code| {
|
|response, code| {
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1103,7 +1103,8 @@ async fn test_degraded_score_details() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
|
@ -93,13 +93,14 @@ async fn federation_empty_list() {
|
|||||||
|
|
||||||
let (response, code) = server.multi_search(json!({"federation": {}, "queries": []})).await;
|
let (response, code) = server.multi_search(json!({"federation": {}, "queries": []})).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -164,7 +165,7 @@ async fn simple_search_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response["results"], { ".**.processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response["results"], { ".**.processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"indexUid": "SHARED_DOCUMENTS",
|
"indexUid": "SHARED_DOCUMENTS",
|
||||||
@ -182,7 +183,8 @@ async fn simple_search_single_index() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"indexUid": "SHARED_DOCUMENTS",
|
"indexUid": "SHARED_DOCUMENTS",
|
||||||
@ -200,7 +202,8 @@ async fn simple_search_single_index() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
@ -217,7 +220,7 @@ async fn federation_single_search_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -237,7 +240,8 @@ async fn federation_single_search_single_index() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -256,7 +260,7 @@ async fn federation_multiple_search_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -308,7 +312,8 @@ async fn federation_multiple_search_single_index() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 5
|
"estimatedTotalHits": 5,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -325,7 +330,7 @@ async fn federation_two_search_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -358,7 +363,8 @@ async fn federation_two_search_single_index() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -457,7 +463,7 @@ async fn simple_search_two_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response["results"], { ".**.processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response["results"], { ".**.processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"indexUid": "SHARED_DOCUMENTS",
|
"indexUid": "SHARED_DOCUMENTS",
|
||||||
@ -475,7 +481,8 @@ async fn simple_search_two_indexes() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"indexUid": "SHARED_NESTED_DOCUMENTS",
|
"indexUid": "SHARED_NESTED_DOCUMENTS",
|
||||||
@ -516,7 +523,8 @@ async fn simple_search_two_indexes() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
@ -535,7 +543,7 @@ async fn federation_two_search_two_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -596,7 +604,8 @@ async fn federation_two_search_two_indexes() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -626,7 +635,7 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -795,7 +804,8 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -1101,7 +1111,7 @@ async fn federation_filter() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response, @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1140,7 +1150,8 @@ async fn federation_filter() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -1177,7 +1188,7 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1266,7 +1277,8 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -1278,7 +1290,7 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1353,7 +1365,8 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -1449,7 +1462,7 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1538,7 +1551,8 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -1551,7 +1565,7 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1626,7 +1640,8 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -1704,7 +1719,7 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1831,7 +1846,8 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 10
|
"estimatedTotalHits": 10,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -1844,7 +1860,7 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1915,7 +1931,8 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 6
|
"estimatedTotalHits": 6,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -1936,7 +1953,7 @@ async fn federation_sort_different_ranking_rules() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2063,7 +2080,8 @@ async fn federation_sort_different_ranking_rules() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 10
|
"estimatedTotalHits": 10,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -2142,7 +2160,7 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2269,7 +2287,8 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 10
|
"estimatedTotalHits": 10,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -2282,7 +2301,7 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2353,7 +2372,8 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 6
|
"estimatedTotalHits": 6,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2424,7 +2444,7 @@ async fn federation_limit_offset() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2527,7 +2547,8 @@ async fn federation_limit_offset() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2549,7 +2570,7 @@ async fn federation_limit_offset() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2564,7 +2585,8 @@ async fn federation_limit_offset() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2586,7 +2608,7 @@ async fn federation_limit_offset() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2673,7 +2695,8 @@ async fn federation_limit_offset() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 2,
|
"offset": 2,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2695,13 +2718,14 @@ async fn federation_limit_offset() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 12,
|
"offset": 12,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2731,7 +2755,7 @@ async fn federation_formatting() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2861,7 +2885,8 @@ async fn federation_formatting() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2883,7 +2908,7 @@ async fn federation_formatting() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2898,7 +2923,8 @@ async fn federation_formatting() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -2920,7 +2946,7 @@ async fn federation_formatting() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3007,7 +3033,8 @@ async fn federation_formatting() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 2,
|
"offset": 2,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -3029,13 +3056,14 @@ async fn federation_formatting() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 12,
|
"offset": 12,
|
||||||
"estimatedTotalHits": 12
|
"estimatedTotalHits": 12,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -3098,7 +3126,7 @@ async fn federation_null_weight() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3137,7 +3165,8 @@ async fn federation_null_weight() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -3244,7 +3273,7 @@ async fn federation_federated_contains_facets() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3280,7 +3309,8 @@ async fn federation_federated_contains_facets() {
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -3488,7 +3518,7 @@ async fn federation_vector_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3532,7 +3562,8 @@ async fn federation_vector_single_index() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
"semanticHitCount": 4
|
"semanticHitCount": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -3545,7 +3576,7 @@ async fn federation_vector_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3589,7 +3620,8 @@ async fn federation_vector_single_index() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
"semanticHitCount": 4
|
"semanticHitCount": 4,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -3603,7 +3635,7 @@ async fn federation_vector_single_index() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3651,7 +3683,8 @@ async fn federation_vector_single_index() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
"semanticHitCount": 3
|
"semanticHitCount": 3,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -3703,7 +3736,7 @@ async fn federation_vector_two_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -3922,9 +3955,10 @@ async fn federation_vector_two_indexes() {
|
|||||||
0.6
|
0.6
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"semanticHitCount": 6
|
"semanticHitCount": 6,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
|
|
||||||
// hybrid search, distinct embedder
|
// hybrid search, distinct embedder
|
||||||
let (response, code) = server
|
let (response, code) = server
|
||||||
@ -3934,7 +3968,7 @@ async fn federation_vector_two_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".**._rankingScore" => "[score]", ".**.requestUid" => "[uuid]" }), @r#"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4161,7 +4195,8 @@ async fn federation_vector_two_indexes() {
|
|||||||
0.6
|
0.6
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"semanticHitCount": 8
|
"semanticHitCount": 8,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"#);
|
||||||
}
|
}
|
||||||
@ -4209,7 +4244,7 @@ async fn federation_facets_different_indexes_same_facet() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4380,7 +4415,8 @@ async fn federation_facets_different_indexes_same_facet() {
|
|||||||
},
|
},
|
||||||
"stats": {}
|
"stats": {}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -4399,7 +4435,7 @@ async fn federation_facets_different_indexes_same_facet() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4541,7 +4577,8 @@ async fn federation_facets_different_indexes_same_facet() {
|
|||||||
"Shazam!": 1
|
"Shazam!": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"facetStats": {}
|
"facetStats": {},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -4561,7 +4598,7 @@ async fn federation_facets_different_indexes_same_facet() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4686,7 +4723,8 @@ async fn federation_facets_different_indexes_same_facet() {
|
|||||||
"distribution": {},
|
"distribution": {},
|
||||||
"stats": {}
|
"stats": {}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -4748,7 +4786,7 @@ async fn federation_facets_same_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4806,7 +4844,8 @@ async fn federation_facets_same_indexes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -4822,7 +4861,7 @@ async fn federation_facets_same_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4908,7 +4947,8 @@ async fn federation_facets_same_indexes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -4925,7 +4965,7 @@ async fn federation_facets_same_indexes() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -4987,7 +5027,8 @@ async fn federation_facets_same_indexes() {
|
|||||||
"min": 2.0,
|
"min": 2.0,
|
||||||
"max": 6.0
|
"max": 6.0
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
@ -5040,7 +5081,7 @@ async fn federation_inconsistent_merge_order() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -5217,7 +5258,8 @@ async fn federation_inconsistent_merge_order() {
|
|||||||
},
|
},
|
||||||
"stats": {}
|
"stats": {}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
@ -5264,7 +5306,7 @@ async fn federation_inconsistent_merge_order() {
|
|||||||
]}))
|
]}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -5404,7 +5446,8 @@ async fn federation_inconsistent_merge_order() {
|
|||||||
"Batman Returns": 1
|
"Batman Returns": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"facetStats": {}
|
"facetStats": {},
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,7 @@ async fn remote_sharding() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -288,12 +288,13 @@ async fn remote_sharding() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 5,
|
"estimatedTotalHits": 5,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -351,12 +352,13 @@ async fn remote_sharding() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 5,
|
"estimatedTotalHits": 5,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
let (response, _status_code) = ms2.multi_search(request.clone()).await;
|
let (response, _status_code) = ms2.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -414,6 +416,7 @@ async fn remote_sharding() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 5,
|
"estimatedTotalHits": 5,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
@ -595,7 +598,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
@ -620,9 +623,10 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"semanticHitCount": 0,
|
"semanticHitCount": 0,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
|
|
||||||
// multi vector search: two local queries, one remote
|
// multi vector search: two local queries, one remote
|
||||||
|
|
||||||
@ -670,7 +674,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r#"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
@ -695,6 +699,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"semanticHitCount": 0,
|
"semanticHitCount": 0,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"#);
|
"#);
|
||||||
@ -745,7 +750,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r#"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
@ -770,6 +775,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"semanticHitCount": 0,
|
"semanticHitCount": 0,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"#);
|
"#);
|
||||||
@ -820,7 +826,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
@ -840,9 +846,10 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"semanticHitCount": 0,
|
"semanticHitCount": 0,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
|
|
||||||
// multi vector search: no local queries, all remote
|
// multi vector search: no local queries, all remote
|
||||||
|
|
||||||
@ -890,7 +897,7 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r#"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"processingTimeMs": "[time]",
|
"processingTimeMs": "[time]",
|
||||||
@ -914,9 +921,10 @@ async fn remote_sharding_retrieve_vectors() {
|
|||||||
0.2
|
0.2
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -1134,7 +1142,7 @@ async fn error_no_weighted_score() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1162,6 +1170,7 @@ async fn error_no_weighted_score() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2,
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "remote hit does not contain `._federation.weightedScoreValues`\n - hint: check that the remote instance is a Meilisearch instance running the same version",
|
"message": "remote hit does not contain `._federation.weightedScoreValues`\n - hint: check that the remote instance is a Meilisearch instance running the same version",
|
||||||
@ -1273,7 +1282,7 @@ async fn error_bad_response() {
|
|||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
|
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1301,6 +1310,7 @@ async fn error_bad_response() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2,
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "could not parse response from the remote host as a federated search response:\n - response from remote: <html>Returning an HTML page</html>\n - hint: check that the remote instance is a Meilisearch instance running the same version",
|
"message": "could not parse response from the remote host as a federated search response:\n - response from remote: <html>Returning an HTML page</html>\n - hint: check that the remote instance is a Meilisearch instance running the same version",
|
||||||
@ -1405,7 +1415,7 @@ async fn error_bad_request() {
|
|||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
|
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1433,6 +1443,7 @@ async fn error_bad_request() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2,
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "remote host responded with code 400:\n - response from remote: {\"message\":\"Inside `.queries[1]`: Index `nottest` not found.\",\"code\":\"index_not_found\",\"type\":\"invalid_request\",\"link\":\"https://docs.meilisearch.com/errors#index_not_found\"}\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
"message": "remote host responded with code 400:\n - response from remote: {\"message\":\"Inside `.queries[1]`: Index `nottest` not found.\",\"code\":\"index_not_found\",\"type\":\"invalid_request\",\"link\":\"https://docs.meilisearch.com/errors#index_not_found\"}\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
||||||
@ -1542,7 +1553,7 @@ async fn error_bad_request_facets_by_index() {
|
|||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
|
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1576,6 +1587,7 @@ async fn error_bad_request_facets_by_index() {
|
|||||||
"stats": {}
|
"stats": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "remote host responded with code 400:\n - response from remote: {\"message\":\"Inside `.federation.facetsByIndex.test0`: Index `test0` not found.\\n - Note: index `test0` is not used in queries\",\"code\":\"index_not_found\",\"type\":\"invalid_request\",\"link\":\"https://docs.meilisearch.com/errors#index_not_found\"}\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
"message": "remote host responded with code 400:\n - response from remote: {\"message\":\"Inside `.federation.facetsByIndex.test0`: Index `test0` not found.\\n - Note: index `test0` is not used in queries\",\"code\":\"index_not_found\",\"type\":\"invalid_request\",\"link\":\"https://docs.meilisearch.com/errors#index_not_found\"}\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
||||||
@ -1688,7 +1700,7 @@ async fn error_bad_request_facets_by_index_facet() {
|
|||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
|
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -1727,6 +1739,7 @@ async fn error_bad_request_facets_by_index_facet() {
|
|||||||
"stats": {}
|
"stats": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "remote host responded with code 400:\n - response from remote: {\"message\":\"Inside `.federation.facetsByIndex.test`: Invalid facet distribution: Attribute `id` is not filterable. This index does not have configured filterable attributes.\\n - Note: index `test` used in `.queries[1]`\",\"code\":\"invalid_multi_search_facets\",\"type\":\"invalid_request\",\"link\":\"https://docs.meilisearch.com/errors#invalid_multi_search_facets\"}\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
"message": "remote host responded with code 400:\n - response from remote: {\"message\":\"Inside `.federation.facetsByIndex.test`: Invalid facet distribution: Attribute `id` is not filterable. This index does not have configured filterable attributes.\\n - Note: index `test` used in `.queries[1]`\",\"code\":\"invalid_multi_search_facets\",\"type\":\"invalid_request\",\"link\":\"https://docs.meilisearch.com/errors#invalid_multi_search_facets\"}\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
||||||
@ -2036,7 +2049,7 @@ async fn error_remote_404() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2064,6 +2077,7 @@ async fn error_remote_404() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2,
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "remote host responded with code 404:\n - response from remote: null\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
"message": "remote host responded with code 404:\n - response from remote: null\n - hint: check that the remote instance has the correct index configuration for that request\n - hint: check that the `network` experimental feature is enabled on the remote instance",
|
||||||
@ -2076,7 +2090,7 @@ async fn error_remote_404() {
|
|||||||
"###);
|
"###);
|
||||||
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2114,6 +2128,7 @@ async fn error_remote_404() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
@ -2245,7 +2260,7 @@ async fn error_remote_sharding_auth() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2273,6 +2288,7 @@ async fn error_remote_sharding_auth() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2,
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1-notsearch": {
|
"ms1-notsearch": {
|
||||||
"message": "could not authenticate against the remote host\n - hint: check that the remote instance was registered with a valid API key having the `search` action",
|
"message": "could not authenticate against the remote host\n - hint: check that the remote instance was registered with a valid API key having the `search` action",
|
||||||
@ -2406,7 +2422,7 @@ async fn remote_sharding_auth() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2454,6 +2470,7 @@ async fn remote_sharding_auth() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
@ -2556,7 +2573,7 @@ async fn error_remote_500() {
|
|||||||
|
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2584,6 +2601,7 @@ async fn error_remote_500() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 2,
|
"estimatedTotalHits": 2,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {
|
"remoteErrors": {
|
||||||
"ms1": {
|
"ms1": {
|
||||||
"message": "remote host responded with code 500:\n - response from remote: {\"error\":\"provoked error\",\"code\":\"test_error\",\"link\":\"https://docs.meilisearch.com/errors#test_error\"}",
|
"message": "remote host responded with code 500:\n - response from remote: {\"error\":\"provoked error\",\"code\":\"test_error\",\"link\":\"https://docs.meilisearch.com/errors#test_error\"}",
|
||||||
@ -2597,7 +2615,7 @@ async fn error_remote_500() {
|
|||||||
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
// the response if full because we queried the instance that works
|
// the response if full because we queried the instance that works
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2635,6 +2653,7 @@ async fn error_remote_500() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
@ -2738,7 +2757,7 @@ async fn error_remote_500_once() {
|
|||||||
// Meilisearch is tolerant to a single failure
|
// Meilisearch is tolerant to a single failure
|
||||||
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
let (response, _status_code) = ms0.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2776,12 +2795,13 @@ async fn error_remote_500_once() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
let (response, _status_code) = ms1.multi_search(request.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]" }), @r###"
|
snapshot!(json_string!(response, { ".processingTimeMs" => "[time]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2819,6 +2839,7 @@ async fn error_remote_500_once() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 3,
|
"estimatedTotalHits": 3,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"remoteErrors": {}
|
"remoteErrors": {}
|
||||||
}
|
}
|
||||||
"###);
|
"###);
|
||||||
|
@ -174,7 +174,8 @@ async fn test_issue_5274() {
|
|||||||
|
|
||||||
snapshot!(json_string!(rep, {
|
snapshot!(json_string!(rep, {
|
||||||
".processingTimeMs" => "[ignored]",
|
".processingTimeMs" => "[ignored]",
|
||||||
}), @r#"
|
".requestUid" => "[uuid]"
|
||||||
|
}), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -188,7 +189,8 @@ async fn test_issue_5274() {
|
|||||||
"hitsPerPage": 1,
|
"hitsPerPage": 1,
|
||||||
"page": 1,
|
"page": 1,
|
||||||
"totalPages": 1,
|
"totalPages": 1,
|
||||||
"totalHits": 1
|
"totalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs
|
source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
@ -21,5 +20,6 @@ snapshot_kind: text
|
|||||||
"processingTimeMs": "[duration]",
|
"processingTimeMs": "[duration]",
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]"
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ async fn check_the_index_features(server: &Server) {
|
|||||||
|
|
||||||
let (results, _status) =
|
let (results, _status) =
|
||||||
kefir.search_post(json!({ "sort": ["age:asc"], "filter": "surname = kefirounet" })).await;
|
kefir.search_post(json!({ "sort": ["age:asc"], "filter": "surname = kefirounet" })).await;
|
||||||
snapshot!(results, name: "search_with_sort_and_filter");
|
snapshot!(json_string!(results, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), name: "search_with_sort_and_filter");
|
||||||
|
|
||||||
// ensuring we can get the vectors and their `regenerate` is still good.
|
// ensuring we can get the vectors and their `regenerate` is still good.
|
||||||
let (results, _status) = kefir.search_post(json!({"retrieveVectors": true})).await;
|
let (results, _status) = kefir.search_post(json!({"retrieveVectors": true})).await;
|
||||||
|
@ -323,7 +323,7 @@ async fn binary_quantize_clear_documents() {
|
|||||||
// Make sure the vector DB has been cleared
|
// Make sure the vector DB has been cleared
|
||||||
let (documents, _code) =
|
let (documents, _code) =
|
||||||
index.search_post(json!({ "hybrid": { "embedder": "manual" }, "vector": [1, 1, 1] })).await;
|
index.search_post(json!({ "hybrid": { "embedder": "manual" }, "vector": [1, 1, 1] })).await;
|
||||||
snapshot!(documents, @r#"
|
snapshot!(json_string!(documents, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "",
|
"query": "",
|
||||||
@ -331,9 +331,10 @@ async fn binary_quantize_clear_documents() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0,
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 0
|
"semanticHitCount": 0
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
|
@ -257,7 +257,7 @@ async fn search_with_vector() {
|
|||||||
json!({"vector": [1.0, 1.0, 1.0], "hybrid": {"semanticRatio": 1.0, "embedder": "rest"}, "limit": 1}
|
json!({"vector": [1.0, 1.0, 1.0], "hybrid": {"semanticRatio": 1.0, "embedder": "rest"}, "limit": 1}
|
||||||
)).await;
|
)).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".requestUid" => "[uuid]", ".processingTimeMs" => "[duration]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -270,9 +270,10 @@ async fn search_with_vector() {
|
|||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 1
|
"semanticHitCount": 1
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -288,7 +289,7 @@ async fn search_with_media() {
|
|||||||
))
|
))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".requestUid" => "[uuid]", ".processingTimeMs" => "[duration]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -302,9 +303,10 @@ async fn search_with_media() {
|
|||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 1
|
"semanticHitCount": 1
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -390,7 +392,7 @@ async fn search_with_query() {
|
|||||||
))
|
))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".requestUid" => "[uuid]", ".processingTimeMs" => "[duration]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -404,9 +406,10 @@ async fn search_with_query() {
|
|||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 1
|
"semanticHitCount": 1
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -2076,7 +2079,7 @@ async fn composite() {
|
|||||||
json!({"vector": [1.0, 1.0, 1.0], "hybrid": {"semanticRatio": 1.0, "embedder": "rest"}, "limit": 1}
|
json!({"vector": [1.0, 1.0, 1.0], "hybrid": {"semanticRatio": 1.0, "embedder": "rest"}, "limit": 1}
|
||||||
)).await;
|
)).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".requestUid" => "[uuid]", ".processingTimeMs" => "[duration]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2089,9 +2092,10 @@ async fn composite() {
|
|||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 1
|
"semanticHitCount": 1
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
|
|
||||||
let (value, code) = index
|
let (value, code) = index
|
||||||
.search_post(
|
.search_post(
|
||||||
@ -2100,7 +2104,7 @@ async fn composite() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(value, @r#"
|
snapshot!(json_string!(value, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r#"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -2114,6 +2118,7 @@ async fn composite() {
|
|||||||
"limit": 1,
|
"limit": 1,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 4,
|
"estimatedTotalHits": 4,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 1
|
"semanticHitCount": 1
|
||||||
}
|
}
|
||||||
"#);
|
"#);
|
||||||
|
@ -689,7 +689,7 @@ async fn clear_documents() {
|
|||||||
// Make sure the vector DB has been cleared
|
// Make sure the vector DB has been cleared
|
||||||
let (documents, _code) =
|
let (documents, _code) =
|
||||||
index.search_post(json!({ "vector": [1, 1, 1], "hybrid": {"embedder": "manual"} })).await;
|
index.search_post(json!({ "vector": [1, 1, 1], "hybrid": {"embedder": "manual"} })).await;
|
||||||
snapshot!(documents, @r#"
|
snapshot!(json_string!(documents, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [],
|
"hits": [],
|
||||||
"query": "",
|
"query": "",
|
||||||
@ -697,9 +697,10 @@ async fn clear_documents() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 0,
|
"estimatedTotalHits": 0,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 0
|
"semanticHitCount": 0
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -743,7 +744,7 @@ async fn add_remove_one_vector_4588() {
|
|||||||
json!({"vector": [1, 1, 1], "hybrid": {"semanticRatio": 1.0, "embedder": "manual"} }),
|
json!({"vector": [1, 1, 1], "hybrid": {"semanticRatio": 1.0, "embedder": "manual"} }),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(documents, @r#"
|
snapshot!(json_string!(documents, { ".processingTimeMs" => "[duration]", ".requestUid" => "[uuid]" }), @r###"
|
||||||
{
|
{
|
||||||
"hits": [
|
"hits": [
|
||||||
{
|
{
|
||||||
@ -756,9 +757,10 @@ async fn add_remove_one_vector_4588() {
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"offset": 0,
|
"offset": 0,
|
||||||
"estimatedTotalHits": 1,
|
"estimatedTotalHits": 1,
|
||||||
|
"requestUid": "[uuid]",
|
||||||
"semanticHitCount": 1
|
"semanticHitCount": 1
|
||||||
}
|
}
|
||||||
"#);
|
"###);
|
||||||
|
|
||||||
let (documents, _code) = index
|
let (documents, _code) = index
|
||||||
.get_all_documents(GetAllDocumentsOptions { retrieve_vectors: true, ..Default::default() })
|
.get_all_documents(GetAllDocumentsOptions { retrieve_vectors: true, ..Default::default() })
|
||||||
|
Reference in New Issue
Block a user