mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
update snapshots
This commit is contained in:
parent
caad40964a
commit
6b29676e7e
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
source: meilisearch/tests/dumps/mod.rs
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"uid": 0,
|
||||||
|
"indexUid": "pets",
|
||||||
|
"status": "succeeded",
|
||||||
|
"type": "settingsUpdate",
|
||||||
|
"canceledBy": null,
|
||||||
|
"details": {
|
||||||
|
"embedders": {
|
||||||
|
"doggo_embedder": {
|
||||||
|
"source": "huggingFace",
|
||||||
|
"model": "sentence-transformers/all-MiniLM-L6-v2",
|
||||||
|
"revision": "e4ce9877abf3edfe10b0d82785e83bdcb973e22e",
|
||||||
|
"documentTemplate": "{{doc.doggo}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"error": null,
|
||||||
|
"duration": "[duration]",
|
||||||
|
"enqueuedAt": "[date]",
|
||||||
|
"startedAt": "[date]",
|
||||||
|
"finishedAt": "[date]"
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
source: meilisearch/tests/dumps/mod.rs
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"uid": 1,
|
||||||
|
"indexUid": "pets",
|
||||||
|
"status": "succeeded",
|
||||||
|
"type": "documentAdditionOrUpdate",
|
||||||
|
"canceledBy": null,
|
||||||
|
"details": {
|
||||||
|
"receivedDocuments": 5,
|
||||||
|
"indexedDocuments": 5
|
||||||
|
},
|
||||||
|
"error": null,
|
||||||
|
"duration": "[duration]",
|
||||||
|
"enqueuedAt": "[date]",
|
||||||
|
"startedAt": "[date]",
|
||||||
|
"finishedAt": "[date]"
|
||||||
|
}
|
@ -128,7 +128,7 @@ async fn simple_search() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]}},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]}},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]}}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}}},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}}},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}}}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"0");
|
snapshot!(response["semanticHitCount"], @"0");
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
@ -137,7 +137,7 @@ async fn simple_search() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":0.9848484848484848},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":0.9472135901451112}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":0.9848484848484848},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":0.9472135901451112}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"2");
|
snapshot!(response["semanticHitCount"], @"2");
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
@ -146,7 +146,7 @@ async fn simple_search() {
|
|||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":0.9472135901451112}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":0.9472135901451112}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"3");
|
snapshot!(response["semanticHitCount"], @"3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ async fn distribution_shift() {
|
|||||||
let search = json!({"q": "Captain", "vector": [1.0, 1.0], "showRankingScore": true, "hybrid": {"semanticRatio": 1.0}, "retrieveVectors": true});
|
let search = json!({"q": "Captain", "vector": [1.0, 1.0], "showRankingScore": true, "hybrid": {"semanticRatio": 1.0}, "retrieveVectors": true});
|
||||||
let (response, code) = index.search_post(search.clone()).await;
|
let (response, code) = index.search_post(search.clone()).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":0.9472135901451112}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":0.9472135901451112}]"###);
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
.update_settings(json!({
|
.update_settings(json!({
|
||||||
@ -228,7 +228,7 @@ async fn distribution_shift() {
|
|||||||
|
|
||||||
let (response, code) = index.search_post(search).await;
|
let (response, code) = index.search_post(search).await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":0.19161224365234375},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":1.1920928955078125e-7},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":1.1920928955078125e-7}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":0.19161224365234375},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":1.1920928955078125e-7},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":1.1920928955078125e-7}]"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
@ -249,7 +249,7 @@ async fn highlighter() {
|
|||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_formatted":{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3"}},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_formatted":{"title":"Shazam!","desc":"a **BEGIN**Captain**END** **BEGIN**Marvel**END** ersatz","id":"1"}},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_formatted":{"title":"Captain Planet","desc":"He's not part of the **BEGIN**Marvel**END** Cinematic Universe","id":"2"}}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_formatted":{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3"}},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_formatted":{"title":"Shazam!","desc":"a **BEGIN**Captain**END** **BEGIN**Marvel**END** ersatz","id":"1"}},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_formatted":{"title":"Captain Planet","desc":"He's not part of the **BEGIN**Marvel**END** Cinematic Universe","id":"2"}}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"0");
|
snapshot!(response["semanticHitCount"], @"0");
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
@ -265,7 +265,7 @@ async fn highlighter() {
|
|||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_formatted":{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3"},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_formatted":{"title":"Captain Planet","desc":"He's not part of the **BEGIN**Marvel**END** Cinematic Universe","id":"2"},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_formatted":{"title":"Shazam!","desc":"a **BEGIN**Captain**END** **BEGIN**Marvel**END** ersatz","id":"1"},"_rankingScore":0.9472135901451112}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_formatted":{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3"},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_formatted":{"title":"Captain Planet","desc":"He's not part of the **BEGIN**Marvel**END** Cinematic Universe","id":"2"},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_formatted":{"title":"Shazam!","desc":"a **BEGIN**Captain**END** **BEGIN**Marvel**END** ersatz","id":"1"},"_rankingScore":0.9472135901451112}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"3");
|
snapshot!(response["semanticHitCount"], @"3");
|
||||||
|
|
||||||
// no highlighting on full semantic
|
// no highlighting on full semantic
|
||||||
@ -282,7 +282,7 @@ async fn highlighter() {
|
|||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_formatted":{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3"},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_formatted":{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2"},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_formatted":{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1"},"_rankingScore":0.9472135901451112}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_formatted":{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3"},"_rankingScore":0.990290343761444},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_formatted":{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2"},"_rankingScore":0.974341630935669},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_formatted":{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1"},"_rankingScore":0.9472135901451112}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"3");
|
snapshot!(response["semanticHitCount"], @"3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ async fn single_document() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"][0], @r###"{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":1.0}"###);
|
snapshot!(response["hits"][0], @r###"{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":1.0}"###);
|
||||||
snapshot!(response["semanticHitCount"], @"1");
|
snapshot!(response["semanticHitCount"], @"1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ async fn query_combination() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":1.0},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":1.0},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":1.0}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":1.0},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":1.0},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":1.0}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"null");
|
snapshot!(response["semanticHitCount"], @"null");
|
||||||
|
|
||||||
// same with a different semantic ratio
|
// same with a different semantic ratio
|
||||||
@ -394,7 +394,7 @@ async fn query_combination() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":1.0},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":1.0},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":1.0}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":1.0},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":1.0},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":1.0}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"null");
|
snapshot!(response["semanticHitCount"], @"null");
|
||||||
|
|
||||||
// wrong vector dimensions
|
// wrong vector dimensions
|
||||||
@ -418,7 +418,7 @@ async fn query_combination() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":0.7773500680923462},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":0.7236068248748779},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":0.6581138968467712}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":0.7773500680923462},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":0.7236068248748779},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":0.6581138968467712}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"3");
|
snapshot!(response["semanticHitCount"], @"3");
|
||||||
|
|
||||||
// full keyword, without a query
|
// full keyword, without a query
|
||||||
@ -427,7 +427,7 @@ async fn query_combination() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":1.0},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":1.0},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":1.0}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":1.0},{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":1.0},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":1.0}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"null");
|
snapshot!(response["semanticHitCount"], @"null");
|
||||||
|
|
||||||
// query + vector, full keyword => keyword
|
// query + vector, full keyword => keyword
|
||||||
@ -436,7 +436,7 @@ async fn query_combination() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":0.9848484848484848},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":[2.0,3.0]},"_rankingScore":0.9848484848484848},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":[1.0,3.0]},"_rankingScore":0.9242424242424242}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":0.9848484848484848},{"title":"Captain Marvel","desc":"a Shazam ersatz","id":"3","_vectors":{"default":{"userDefined":true,"embedding":[2.0,3.0]}},"_rankingScore":0.9848484848484848},{"title":"Shazam!","desc":"a Captain Marvel ersatz","id":"1","_vectors":{"default":{"userDefined":true,"embedding":[1.0,3.0]}},"_rankingScore":0.9242424242424242}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"null");
|
snapshot!(response["semanticHitCount"], @"null");
|
||||||
|
|
||||||
// query + vector, no hybrid keyword =>
|
// query + vector, no hybrid keyword =>
|
||||||
@ -479,6 +479,6 @@ async fn query_combination() {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
snapshot!(code, @"200 OK");
|
snapshot!(code, @"200 OK");
|
||||||
snapshot!(response["hits"], @r###"[{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":[1.0,2.0]},"_rankingScore":0.9242424242424242}]"###);
|
snapshot!(response["hits"], @r###"[{"title":"Captain Planet","desc":"He's not part of the Marvel Cinematic Universe","id":"2","_vectors":{"default":{"userDefined":true,"embedding":[1.0,2.0]}},"_rankingScore":0.9242424242424242}]"###);
|
||||||
snapshot!(response["semanticHitCount"], @"0");
|
snapshot!(response["semanticHitCount"], @"0");
|
||||||
}
|
}
|
||||||
|
@ -1349,11 +1349,14 @@ async fn experimental_feature_vector_store() {
|
|||||||
"title": "Shazam!",
|
"title": "Shazam!",
|
||||||
"id": "287947",
|
"id": "287947",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
1.0,
|
1.0,
|
||||||
2.0,
|
2.0,
|
||||||
3.0
|
3.0
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"_rankingScore": 1.0
|
"_rankingScore": 1.0
|
||||||
},
|
},
|
||||||
@ -1361,11 +1364,14 @@ async fn experimental_feature_vector_store() {
|
|||||||
"title": "Captain Marvel",
|
"title": "Captain Marvel",
|
||||||
"id": "299537",
|
"id": "299537",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
1.0,
|
1.0,
|
||||||
2.0,
|
2.0,
|
||||||
54.0
|
54.0
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.9129111766815186
|
"_rankingScore": 0.9129111766815186
|
||||||
},
|
},
|
||||||
@ -1373,11 +1379,14 @@ async fn experimental_feature_vector_store() {
|
|||||||
"title": "Gläss",
|
"title": "Gläss",
|
||||||
"id": "450465",
|
"id": "450465",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
-100.0,
|
-100.0,
|
||||||
340.0,
|
340.0,
|
||||||
90.0
|
90.0
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.8106412887573242
|
"_rankingScore": 0.8106412887573242
|
||||||
},
|
},
|
||||||
@ -1385,11 +1394,14 @@ async fn experimental_feature_vector_store() {
|
|||||||
"title": "How to Train Your Dragon: The Hidden World",
|
"title": "How to Train Your Dragon: The Hidden World",
|
||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
-100.0,
|
-100.0,
|
||||||
231.0,
|
231.0,
|
||||||
32.0
|
32.0
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.7412010431289673
|
"_rankingScore": 0.7412010431289673
|
||||||
},
|
},
|
||||||
@ -1397,11 +1409,14 @@ async fn experimental_feature_vector_store() {
|
|||||||
"title": "Escape Room",
|
"title": "Escape Room",
|
||||||
"id": "522681",
|
"id": "522681",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
10.0,
|
10.0,
|
||||||
-23.0,
|
-23.0,
|
||||||
32.0
|
32.0
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.6972063183784485
|
"_rankingScore": 0.6972063183784485
|
||||||
}
|
}
|
||||||
|
@ -87,49 +87,61 @@ async fn basic() {
|
|||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "522681",
|
"id": "522681",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.10000000149011612,
|
0.10000000149011612,
|
||||||
0.6000000238418579,
|
0.6000000238418579,
|
||||||
0.800000011920929
|
0.800000011920929
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Captain Marvel",
|
"title": "Captain Marvel",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "299537",
|
"id": "299537",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.6000000238418579,
|
0.6000000238418579,
|
||||||
0.800000011920929,
|
0.800000011920929,
|
||||||
-0.20000000298023224
|
-0.20000000298023224
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "How to Train Your Dragon: The Hidden World",
|
"title": "How to Train Your Dragon: The Hidden World",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.699999988079071,
|
0.699999988079071,
|
||||||
0.699999988079071,
|
0.699999988079071,
|
||||||
-0.4000000059604645
|
-0.4000000059604645
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Shazam!",
|
"title": "Shazam!",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "287947",
|
"id": "287947",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.800000011920929,
|
0.800000011920929,
|
||||||
0.4000000059604645,
|
0.4000000059604645,
|
||||||
-0.5
|
-0.5
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
})
|
})
|
||||||
@ -145,49 +157,61 @@ async fn basic() {
|
|||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.699999988079071,
|
0.699999988079071,
|
||||||
0.699999988079071,
|
0.699999988079071,
|
||||||
-0.4000000059604645
|
-0.4000000059604645
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Shazam!",
|
"title": "Shazam!",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "287947",
|
"id": "287947",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.800000011920929,
|
0.800000011920929,
|
||||||
0.4000000059604645,
|
0.4000000059604645,
|
||||||
-0.5
|
-0.5
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Escape Room",
|
"title": "Escape Room",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "522681",
|
"id": "522681",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.10000000149011612,
|
0.10000000149011612,
|
||||||
0.6000000238418579,
|
0.6000000238418579,
|
||||||
0.800000011920929
|
0.800000011920929
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "All Quiet on the Western Front",
|
"title": "All Quiet on the Western Front",
|
||||||
"release_year": 1930,
|
"release_year": 1930,
|
||||||
"id": "143",
|
"id": "143",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
-0.5,
|
-0.5,
|
||||||
0.30000001192092896,
|
0.30000001192092896,
|
||||||
0.8500000238418579
|
0.8500000238418579
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
})
|
})
|
||||||
@ -467,37 +491,46 @@ async fn filter() {
|
|||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "299537",
|
"id": "299537",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.6000000238418579,
|
0.6000000238418579,
|
||||||
0.800000011920929,
|
0.800000011920929,
|
||||||
-0.20000000298023224
|
-0.20000000298023224
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "How to Train Your Dragon: The Hidden World",
|
"title": "How to Train Your Dragon: The Hidden World",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.699999988079071,
|
0.699999988079071,
|
||||||
0.699999988079071,
|
0.699999988079071,
|
||||||
-0.4000000059604645
|
-0.4000000059604645
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Shazam!",
|
"title": "Shazam!",
|
||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "287947",
|
"id": "287947",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.800000011920929,
|
0.800000011920929,
|
||||||
0.4000000059604645,
|
0.4000000059604645,
|
||||||
-0.5
|
-0.5
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -516,13 +549,16 @@ async fn filter() {
|
|||||||
"release_year": 1930,
|
"release_year": 1930,
|
||||||
"id": "143",
|
"id": "143",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
-0.5,
|
-0.5,
|
||||||
0.30000001192092896,
|
0.30000001192092896,
|
||||||
0.8500000238418579
|
0.8500000238418579
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
@ -572,13 +608,16 @@ async fn limit_and_offset() {
|
|||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "522681",
|
"id": "522681",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.10000000149011612,
|
0.10000000149011612,
|
||||||
0.6000000238418579,
|
0.6000000238418579,
|
||||||
0.800000011920929
|
0.800000011920929
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
})
|
})
|
||||||
@ -596,13 +635,16 @@ async fn limit_and_offset() {
|
|||||||
"release_year": 2019,
|
"release_year": 2019,
|
||||||
"id": "299537",
|
"id": "299537",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": {
|
||||||
|
"userDefined": true,
|
||||||
|
"embedding": [
|
||||||
0.6000000238418579,
|
0.6000000238418579,
|
||||||
0.800000011920929,
|
0.800000011920929,
|
||||||
-0.20000000298023224
|
-0.20000000298023224
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
"###);
|
"###);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user