Improve composite test

This commit is contained in:
Mubelotix 2025-07-08 13:57:07 +02:00
parent 2f1be0ff86
commit 1ae47bec77
No known key found for this signature in database
GPG key ID: 0406DF6C3A69B942

View file

@ -2261,4 +2261,26 @@ async fn composite() {
"semanticHitCount": 1
}
"#);
let (value, code) = index.search_post(
json!({"q": "bulldog", "hybrid": {"semanticRatio": 1.0, "embedder": "rest"}, "limit": 1}
)).await;
snapshot!(code, @"200 OK");
snapshot!(value, @r#"
{
"hits": [
{
"id": 3,
"name": "dustin",
"breed": "bulldog"
}
],
"query": "bulldog",
"processingTimeMs": "[duration]",
"limit": 1,
"offset": 0,
"estimatedTotalHits": 4,
"semanticHitCount": 1
}
"#);
}