Fix typos in comments and update assertions

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
Martin Tzvetanov Grigorov 2025-06-10 14:48:59 +03:00
parent 8fa6e8670a
commit 34d8a54c4b
No known key found for this signature in database
GPG Key ID: 3194FD8C1AE300EF

View File

@ -164,7 +164,7 @@ async fn federation_single_search_single_index() {
"red" "red"
], ],
"_federation": { "_federation": {
"indexUid": "[uuid]", "indexUid": "SHARED_DOCUMENTS",
"queriesPosition": 0, "queriesPosition": 0,
"weightedRankingScore": 1.0 "weightedRankingScore": 1.0
} }
@ -1104,7 +1104,7 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
.await; .await;
index.wait_task(value.uid()).await.succeeded(); index.wait_task(value.uid()).await.succeeded();
// two identical placeholder search should have all results from first query // two identical placeholder searches should have all results from the first query
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true }, {"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true },
@ -1317,7 +1317,7 @@ async fn federation_sort_same_indexes_same_criterion_opposite_direction() {
.await; .await;
index.wait_task(value.uid()).await.succeeded(); index.wait_task(value.uid()).await.succeeded();
// two identical placeholder search should have all results from first query // two identical placeholder searches should have all results from the first query
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true }, {"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true },
@ -1376,7 +1376,7 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
.await; .await;
index.wait_task(value.uid()).await.succeeded(); index.wait_task(value.uid()).await.succeeded();
// return mothers and fathers ordered accross fields. // return mothers and fathers ordered across fields.
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true }, {"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true },
@ -1590,7 +1590,7 @@ async fn federation_sort_same_indexes_different_criterion_opposite_direction() {
.await; .await;
index.wait_task(value.uid()).await.succeeded(); index.wait_task(value.uid()).await.succeeded();
// two identical placeholder search should have all results from first query // two identical placeholder searches should have all results from the first query
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true }, {"indexUid" : index.uid, "q": "", "sort": ["mother:asc"], "showRankingScore": true },
@ -1670,7 +1670,7 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
.await; .await;
batman_index.wait_task(value.uid()).await.succeeded(); batman_index.wait_task(value.uid()).await.succeeded();
// return titles ordered accross indexes // return titles ordered across indexes
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : movies_index.uid, "q": "", "sort": ["title:asc"], "showRankingScore": true }, {"indexUid" : movies_index.uid, "q": "", "sort": ["title:asc"], "showRankingScore": true },
@ -1940,7 +1940,7 @@ async fn federation_sort_different_ranking_rules() {
.await; .await;
batman_index.wait_task(value.uid()).await.succeeded(); batman_index.wait_task(value.uid()).await.succeeded();
// return titles ordered accross indexes // return titles ordered across indexes
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : movies_index.uid, "q": "", "sort": ["title:asc"], "showRankingScore": true }, {"indexUid" : movies_index.uid, "q": "", "sort": ["title:asc"], "showRankingScore": true },
@ -2226,7 +2226,7 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
.await; .await;
batman_index.wait_task(value.uid()).await.succeeded(); batman_index.wait_task(value.uid()).await.succeeded();
// return titles ordered accross indexes // return titles ordered across indexes
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": {}, "queries": [ .multi_search(json!({"federation": {}, "queries": [
{"indexUid" : movies_index.uid, "q": "", "sort": ["title:asc"], "showRankingScore": true }, {"indexUid" : movies_index.uid, "q": "", "sort": ["title:asc"], "showRankingScore": true },
@ -3377,7 +3377,7 @@ async fn federation_federated_contains_facets() {
]})) ]}))
.await; .await;
snapshot!(code, @"200 OK"); snapshot!(code, @"200 OK");
insta::assert_json_snapshot!(response, { ".processingTimeMs" => "[time]" }, @r###" insta::assert_json_snapshot!(response, { ".processingTimeMs" => "[time]", ".**.indexUid" => "[uuid]" }, @r###"
{ {
"hits": [ "hits": [
{ {
@ -4347,7 +4347,7 @@ async fn federation_facets_different_indexes_same_facet() {
.await; .await;
batman_2_index.wait_task(value.uid()).await.succeeded(); batman_2_index.wait_task(value.uid()).await.succeeded();
// return titles ordered accross indexes // return titles ordered across indexes
let (response, code) = server let (response, code) = server
.multi_search(json!({"federation": { .multi_search(json!({"federation": {
"facetsByIndex": { "facetsByIndex": {