mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Fix tests
This commit is contained in:
parent
73d3d286d9
commit
c32bec338f
13 changed files with 18 additions and 887 deletions
|
@ -11,19 +11,6 @@ async fn index_with_documents_user_provided<'a>(
|
|||
) -> Index<'a> {
|
||||
let index = server.index("test");
|
||||
|
||||
let (response, code) = server.set_features(json!({"vectorStore": true})).await;
|
||||
|
||||
meili_snap::snapshot!(code, @"200 OK");
|
||||
meili_snap::snapshot!(meili_snap::json_string!(response), @r###"
|
||||
{
|
||||
"vectorStore": true,
|
||||
"metrics": false,
|
||||
"logsRoute": false,
|
||||
"editDocumentsByFunction": false,
|
||||
"containsFilter": false
|
||||
}
|
||||
"###);
|
||||
|
||||
let (response, code) = index
|
||||
.update_settings(json!({ "embedders": {"default": {
|
||||
"source": "userProvided",
|
||||
|
@ -41,19 +28,6 @@ async fn index_with_documents_user_provided<'a>(
|
|||
async fn index_with_documents_hf<'a>(server: &'a Server, documents: &Value) -> Index<'a> {
|
||||
let index = server.index("test");
|
||||
|
||||
let (response, code) = server.set_features(json!({"vectorStore": true})).await;
|
||||
|
||||
meili_snap::snapshot!(code, @"200 OK");
|
||||
meili_snap::snapshot!(meili_snap::json_string!(response), @r###"
|
||||
{
|
||||
"vectorStore": true,
|
||||
"metrics": false,
|
||||
"logsRoute": false,
|
||||
"editDocumentsByFunction": false,
|
||||
"containsFilter": false
|
||||
}
|
||||
"###);
|
||||
|
||||
let (response, code) = index
|
||||
.update_settings(json!({ "embedders": {"default": {
|
||||
"source": "huggingFace",
|
||||
|
|
|
@ -818,13 +818,6 @@ async fn test_score_details() {
|
|||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_rankingScoreDetails": {
|
||||
"words": {
|
||||
"order": 0,
|
||||
|
@ -1159,206 +1152,6 @@ async fn test_degraded_score_details() {
|
|||
.await;
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn experimental_feature_vector_store() {
|
||||
let server = Server::new().await;
|
||||
let index = server.index("test");
|
||||
|
||||
let documents = DOCUMENTS.clone();
|
||||
|
||||
let (task, _status_code) = index.add_documents(json!(documents), None).await;
|
||||
index.wait_task(task.uid()).await.succeeded();
|
||||
|
||||
let (response, code) = index
|
||||
.search_post(json!({
|
||||
"vector": [1.0, 2.0, 3.0],
|
||||
"hybrid": {
|
||||
"embedder": "manual",
|
||||
},
|
||||
"showRankingScore": true
|
||||
}))
|
||||
.await;
|
||||
|
||||
{
|
||||
meili_snap::snapshot!(code, @"400 Bad Request");
|
||||
meili_snap::snapshot!(meili_snap::json_string!(response), @r###"
|
||||
{
|
||||
"message": "Passing `vector` as a parameter requires enabling the `vector store` experimental feature. See https://github.com/meilisearch/product/discussions/677",
|
||||
"code": "feature_not_enabled",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#feature_not_enabled"
|
||||
}
|
||||
"###);
|
||||
}
|
||||
|
||||
index
|
||||
.search(json!({
|
||||
"retrieveVectors": true,
|
||||
"showRankingScore": true
|
||||
}), |response, code|{
|
||||
meili_snap::snapshot!(code, @"400 Bad Request");
|
||||
meili_snap::snapshot!(meili_snap::json_string!(response), @r###"
|
||||
{
|
||||
"message": "Passing `retrieveVectors` as a parameter requires enabling the `vector store` experimental feature. See https://github.com/meilisearch/product/discussions/677",
|
||||
"code": "feature_not_enabled",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#feature_not_enabled"
|
||||
}
|
||||
"###);
|
||||
})
|
||||
.await;
|
||||
|
||||
let (response, code) = server.set_features(json!({"vectorStore": true})).await;
|
||||
meili_snap::snapshot!(code, @"200 OK");
|
||||
meili_snap::snapshot!(response["vectorStore"], @"true");
|
||||
|
||||
let (response, code) = index
|
||||
.update_settings(json!({"embedders": {
|
||||
"manual": {
|
||||
"source": "userProvided",
|
||||
"dimensions": 3,
|
||||
}
|
||||
}}))
|
||||
.await;
|
||||
|
||||
meili_snap::snapshot!(response, @r###"
|
||||
{
|
||||
"taskUid": 1,
|
||||
"indexUid": "test",
|
||||
"status": "enqueued",
|
||||
"type": "settingsUpdate",
|
||||
"enqueuedAt": "[date]"
|
||||
}
|
||||
"###);
|
||||
meili_snap::snapshot!(code, @"202 Accepted");
|
||||
let response = index.wait_task(response.uid()).await;
|
||||
|
||||
meili_snap::snapshot!(meili_snap::json_string!(response["status"]), @"\"succeeded\"");
|
||||
|
||||
let (response, code) = index
|
||||
.search_post(json!({
|
||||
"vector": [1.0, 2.0, 3.0],
|
||||
"hybrid": {
|
||||
"embedder": "manual",
|
||||
},
|
||||
"showRankingScore": true,
|
||||
"retrieveVectors": true,
|
||||
}))
|
||||
.await;
|
||||
|
||||
meili_snap::snapshot!(code, @"200 OK");
|
||||
// vector search returns all documents that don't have vectors in the last bucket, like all sorts
|
||||
meili_snap::snapshot!(meili_snap::json_string!(response["hits"]), @r###"
|
||||
[
|
||||
{
|
||||
"title": "Shazam!",
|
||||
"id": "287947",
|
||||
"color": [
|
||||
"green",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": {
|
||||
"embeddings": [
|
||||
[
|
||||
1.0,
|
||||
2.0,
|
||||
3.0
|
||||
]
|
||||
],
|
||||
"regenerate": false
|
||||
}
|
||||
},
|
||||
"_rankingScore": 1.0
|
||||
},
|
||||
{
|
||||
"title": "Captain Marvel",
|
||||
"id": "299537",
|
||||
"color": [
|
||||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": {
|
||||
"embeddings": [
|
||||
[
|
||||
1.0,
|
||||
2.0,
|
||||
54.0
|
||||
]
|
||||
],
|
||||
"regenerate": false
|
||||
}
|
||||
},
|
||||
"_rankingScore": 0.9129111766815186
|
||||
},
|
||||
{
|
||||
"title": "Gläss",
|
||||
"id": "450465",
|
||||
"color": [
|
||||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": {
|
||||
"embeddings": [
|
||||
[
|
||||
-100.0,
|
||||
340.0,
|
||||
90.0
|
||||
]
|
||||
],
|
||||
"regenerate": false
|
||||
}
|
||||
},
|
||||
"_rankingScore": 0.8106412887573242
|
||||
},
|
||||
{
|
||||
"title": "How to Train Your Dragon: The Hidden World",
|
||||
"id": "166428",
|
||||
"color": [
|
||||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": {
|
||||
"embeddings": [
|
||||
[
|
||||
-100.0,
|
||||
231.0,
|
||||
32.0
|
||||
]
|
||||
],
|
||||
"regenerate": false
|
||||
}
|
||||
},
|
||||
"_rankingScore": 0.7412010431289673
|
||||
},
|
||||
{
|
||||
"title": "Escape Room",
|
||||
"id": "522681",
|
||||
"color": [
|
||||
"yellow",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": {
|
||||
"embeddings": [
|
||||
[
|
||||
10.0,
|
||||
-23.0,
|
||||
32.0
|
||||
]
|
||||
],
|
||||
"regenerate": false
|
||||
}
|
||||
},
|
||||
"_rankingScore": 0.6972063183784485
|
||||
}
|
||||
]
|
||||
"###);
|
||||
}
|
||||
|
||||
#[cfg(feature = "default")]
|
||||
#[actix_rt::test]
|
||||
async fn camelcased_words() {
|
||||
|
@ -1611,14 +1404,7 @@ async fn simple_search_with_strange_synonyms() {
|
|||
"color": [
|
||||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"###);
|
||||
|
@ -1636,14 +1422,7 @@ async fn simple_search_with_strange_synonyms() {
|
|||
"color": [
|
||||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"###);
|
||||
|
@ -1661,14 +1440,7 @@ async fn simple_search_with_strange_synonyms() {
|
|||
"color": [
|
||||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"###);
|
||||
|
|
|
@ -110,14 +110,7 @@ async fn simple_search_single_index() {
|
|||
"color": [
|
||||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"query": "glass",
|
||||
|
@ -135,14 +128,7 @@ async fn simple_search_single_index() {
|
|||
"color": [
|
||||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"query": "captain",
|
||||
|
@ -180,13 +166,6 @@ async fn federation_single_search_single_index() {
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 0,
|
||||
|
@ -303,13 +282,6 @@ async fn federation_two_search_single_index() {
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 0,
|
||||
|
@ -323,13 +295,6 @@ async fn federation_two_search_single_index() {
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 1,
|
||||
|
@ -477,14 +442,7 @@ async fn simple_search_two_indexes() {
|
|||
"color": [
|
||||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"query": "glass",
|
||||
|
@ -510,14 +468,7 @@ async fn simple_search_two_indexes() {
|
|||
"age": 4
|
||||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
"cattos": "pésti"
|
||||
},
|
||||
{
|
||||
"id": 654,
|
||||
|
@ -532,14 +483,7 @@ async fn simple_search_two_indexes() {
|
|||
"cattos": [
|
||||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"query": "pésti",
|
||||
|
@ -583,13 +527,6 @@ async fn federation_two_search_two_indexes() {
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 0,
|
||||
|
@ -611,13 +548,6 @@ async fn federation_two_search_two_indexes() {
|
|||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -638,13 +568,6 @@ async fn federation_two_search_two_indexes() {
|
|||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -705,13 +628,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 0,
|
||||
|
@ -733,13 +649,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 2,
|
||||
|
@ -771,13 +680,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 1,
|
||||
|
@ -791,13 +693,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
"yellow",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
-23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 3,
|
||||
|
@ -822,13 +717,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
"moumoute",
|
||||
"gomez"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 4,
|
||||
|
@ -867,13 +755,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 2,
|
||||
|
@ -896,13 +777,6 @@ async fn federation_multiple_search_multiple_indexes() {
|
|||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "test",
|
||||
"queriesPosition": 6,
|
||||
|
@ -1391,13 +1265,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1412,13 +1279,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
"cattos": [
|
||||
"enigma"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1440,13 +1300,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1472,13 +1325,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
"moumoute",
|
||||
"gomez"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1520,13 +1366,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1548,13 +1387,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1580,13 +1412,6 @@ async fn federation_sort_same_indexes_same_criterion_same_direction() {
|
|||
"moumoute",
|
||||
"gomez"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -1714,13 +1539,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -1746,13 +1564,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
"moumoute",
|
||||
"gomez"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -1767,13 +1578,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
"cattos": [
|
||||
"enigma"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1795,13 +1599,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -1843,13 +1640,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
"simba",
|
||||
"pestiféré"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1872,13 +1662,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
}
|
||||
],
|
||||
"cattos": "pésti",
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 0,
|
||||
|
@ -1904,13 +1687,6 @@ async fn federation_sort_same_indexes_different_criterion_same_direction() {
|
|||
"moumoute",
|
||||
"gomez"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "nested",
|
||||
"queriesPosition": 1,
|
||||
|
@ -2101,13 +1877,6 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2122,13 +1891,6 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||
"yellow",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
-23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2143,13 +1905,6 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2164,13 +1919,6 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2185,13 +1933,6 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||
"green",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2226,13 +1967,6 @@ async fn federation_sort_different_indexes_same_criterion_same_direction() {
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 1,
|
||||
|
@ -2413,13 +2147,6 @@ async fn federation_sort_different_ranking_rules() {
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2434,13 +2161,6 @@ async fn federation_sort_different_ranking_rules() {
|
|||
"yellow",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
-23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2455,13 +2175,6 @@ async fn federation_sort_different_ranking_rules() {
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2476,13 +2189,6 @@ async fn federation_sort_different_ranking_rules() {
|
|||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2497,13 +2203,6 @@ async fn federation_sort_different_ranking_rules() {
|
|||
"green",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2714,13 +2413,6 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2755,13 +2447,6 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||
"yellow",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
10,
|
||||
-23,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2776,13 +2461,6 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||
"blue",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
340,
|
||||
90
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2797,13 +2475,6 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||
"green",
|
||||
"red"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
-100,
|
||||
231,
|
||||
32
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2818,13 +2489,6 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||
"green",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 0,
|
||||
|
@ -2879,13 +2543,6 @@ async fn federation_sort_different_indexes_different_criterion_same_direction()
|
|||
"yellow",
|
||||
"blue"
|
||||
],
|
||||
"_vectors": {
|
||||
"manual": [
|
||||
1,
|
||||
2,
|
||||
54
|
||||
]
|
||||
},
|
||||
"_federation": {
|
||||
"indexUid": "movies",
|
||||
"queriesPosition": 1,
|
||||
|
@ -4094,13 +3751,6 @@ async fn federation_non_federated_contains_federation_option() {
|
|||
#[actix_rt::test]
|
||||
async fn federation_vector_single_index() {
|
||||
let server = Server::new().await;
|
||||
let (_, code) = server
|
||||
.set_features(json!({
|
||||
"vectorStore": true
|
||||
}))
|
||||
.await;
|
||||
|
||||
snapshot!(code, @"200 OK");
|
||||
|
||||
let index = server.index("vectors");
|
||||
|
||||
|
@ -4302,13 +3952,6 @@ async fn federation_vector_single_index() {
|
|||
#[actix_rt::test]
|
||||
async fn federation_vector_two_indexes() {
|
||||
let server = Server::new().await;
|
||||
let (_, code) = server
|
||||
.set_features(json!({
|
||||
"vectorStore": true
|
||||
}))
|
||||
.await;
|
||||
|
||||
snapshot!(code, @"200 OK");
|
||||
|
||||
let index = server.index("vectors-animal");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue