mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Add test
This commit is contained in:
parent
48527761e7
commit
b274106ad3
1 changed files with 24 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue