From 1594c54e2301bbda794c192efcc1ccc8016df6e0 Mon Sep 17 00:00:00 2001 From: Lucas Black Date: Mon, 19 May 2025 02:37:23 -0700 Subject: [PATCH] Provide more information about resulting documents on test case --- .../meilisearch/tests/search/restrict_searchable.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/meilisearch/tests/search/restrict_searchable.rs b/crates/meilisearch/tests/search/restrict_searchable.rs index db1082053..2232d961b 100644 --- a/crates/meilisearch/tests/search/restrict_searchable.rs +++ b/crates/meilisearch/tests/search/restrict_searchable.rs @@ -466,10 +466,19 @@ async fn nested_search_on_title_with_prefix_wildcard() { // Wildcard should match to 'details.' attribute index .search( - json!({"q": "Captain Marvel", "attributesToSearchOn": ["*.title"]}), + json!({"q": "Captain Marvel", "attributesToSearchOn": ["*.title"], "attributesToRetrieve": ["id"]}), |response, code| { snapshot!(code, @"200 OK"); - snapshot!(response["hits"].as_array().unwrap().len(), @"2"); + snapshot!(json_string!(response["hits"]), + @r###" + [ + { + "id": "3" + }, + { + "id": "2" + } + ]"###); }, ) .await;