Provide more information about resulting documents on test case

This commit is contained in:
Lucas Black 2025-05-19 02:37:23 -07:00
parent 13b607bd68
commit 1594c54e23

View File

@ -466,10 +466,19 @@ async fn nested_search_on_title_with_prefix_wildcard() {
// Wildcard should match to 'details.' attribute // Wildcard should match to 'details.' attribute
index index
.search( .search(
json!({"q": "Captain Marvel", "attributesToSearchOn": ["*.title"]}), json!({"q": "Captain Marvel", "attributesToSearchOn": ["*.title"], "attributesToRetrieve": ["id"]}),
|response, code| { |response, code| {
snapshot!(code, @"200 OK"); snapshot!(code, @"200 OK");
snapshot!(response["hits"].as_array().unwrap().len(), @"2"); snapshot!(json_string!(response["hits"]),
@r###"
[
{
"id": "3"
},
{
"id": "2"
}
]"###);
}, },
) )
.await; .await;