This commit is contained in:
Mubelotix 2025-07-04 13:05:52 +02:00
parent 48527761e7
commit b274106ad3
No known key found for this signature in database
GPG key ID: 0406DF6C3A69B942

View file

@ -267,6 +267,30 @@ async fn search_with_media() {
"#);
}
#[actix_rt::test]
async fn search_with_media_and_vector() {
let index = shared_index_for_fragments().await;
let (value, code) = index
.search_post(json!({
"vector": [1.0, 1.0, 1.0],
"media": { "breed": "labrador" },
"hybrid": {"semanticRatio": 1.0, "embedder": "rest"},
"limit": 1
}
))
.await;
snapshot!(code, @"400 Bad Request");
snapshot!(value, @r#"
{
"message": "Invalid request: both `media` and `vector` parameters are present.",
"code": "invalid_search_media_and_vector",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_search_media_and_vector"
}
"#);
}
#[actix_rt::test]
async fn search_with_media_matching_multiple_fragments() {
let index = shared_index_for_fragments().await;