mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
Fix tests
This commit is contained in:
parent
0462ebbe58
commit
d05d49ffd8
@ -895,9 +895,9 @@ async fn test_score_details() {
|
|||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
231,
|
231.0,
|
||||||
32
|
32.0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_rankingScoreDetails": {
|
"_rankingScoreDetails": {
|
||||||
@ -1096,9 +1096,9 @@ async fn experimental_feature_vector_store() {
|
|||||||
"id": "287947",
|
"id": "287947",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
1,
|
1.0,
|
||||||
2,
|
2.0,
|
||||||
3
|
3.0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_rankingScore": 1.0
|
"_rankingScore": 1.0
|
||||||
@ -1108,9 +1108,9 @@ async fn experimental_feature_vector_store() {
|
|||||||
"id": "299537",
|
"id": "299537",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
1,
|
1.0,
|
||||||
2,
|
2.0,
|
||||||
54
|
54.0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.9129111766815186
|
"_rankingScore": 0.9129111766815186
|
||||||
@ -1120,9 +1120,9 @@ async fn experimental_feature_vector_store() {
|
|||||||
"id": "450465",
|
"id": "450465",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
340,
|
340.0,
|
||||||
90
|
90.0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.8106412887573242
|
"_rankingScore": 0.8106412887573242
|
||||||
@ -1132,9 +1132,9 @@ async fn experimental_feature_vector_store() {
|
|||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
231,
|
231.0,
|
||||||
32
|
32.0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.7412010431289673
|
"_rankingScore": 0.7412010431289673
|
||||||
@ -1144,9 +1144,9 @@ async fn experimental_feature_vector_store() {
|
|||||||
"id": "522681",
|
"id": "522681",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
10,
|
10.0,
|
||||||
-23,
|
-23.0,
|
||||||
32
|
32.0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_rankingScore": 0.6972063183784485
|
"_rankingScore": 0.6972063183784485
|
||||||
@ -1405,9 +1405,9 @@ async fn simple_search_with_strange_synonyms() {
|
|||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
231,
|
231.0,
|
||||||
32
|
32.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1426,9 +1426,9 @@ async fn simple_search_with_strange_synonyms() {
|
|||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
231,
|
231.0,
|
||||||
32
|
32.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1447,9 +1447,9 @@ async fn simple_search_with_strange_synonyms() {
|
|||||||
"id": "166428",
|
"id": "166428",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
231,
|
231.0,
|
||||||
32
|
32.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,9 +75,9 @@ async fn simple_search_single_index() {
|
|||||||
"id": "450465",
|
"id": "450465",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
340,
|
340.0,
|
||||||
90
|
90.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,9 +96,9 @@ async fn simple_search_single_index() {
|
|||||||
"id": "299537",
|
"id": "299537",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
1,
|
1.0,
|
||||||
2,
|
2.0,
|
||||||
54
|
54.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,9 +194,9 @@ async fn simple_search_two_indexes() {
|
|||||||
"id": "450465",
|
"id": "450465",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
-100,
|
-100.0,
|
||||||
340,
|
340.0,
|
||||||
90
|
90.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,9 +227,9 @@ async fn simple_search_two_indexes() {
|
|||||||
"cattos": "pésti",
|
"cattos": "pésti",
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
1,
|
1.0,
|
||||||
2,
|
2.0,
|
||||||
3
|
3.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -249,9 +249,9 @@ async fn simple_search_two_indexes() {
|
|||||||
],
|
],
|
||||||
"_vectors": {
|
"_vectors": {
|
||||||
"manual": [
|
"manual": [
|
||||||
1,
|
1.0,
|
||||||
2,
|
2.0,
|
||||||
54
|
54.0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,11 +234,13 @@ pub(crate) fn write_typed_chunk_into_index(
|
|||||||
addition,
|
addition,
|
||||||
)
|
)
|
||||||
else {
|
else {
|
||||||
|
// if the `_vectors` field cannot be parsed as map of vectors, just write it as-is
|
||||||
break 'vectors Some(addition);
|
break 'vectors Some(addition);
|
||||||
};
|
};
|
||||||
vectors.retain_user_provided_vectors();
|
vectors.retain_user_provided_vectors();
|
||||||
let crate::vector::parsed_vectors::ParsedVectors(vectors) = vectors;
|
let crate::vector::parsed_vectors::ParsedVectors(vectors) = vectors;
|
||||||
if vectors.is_empty() {
|
if vectors.is_empty() {
|
||||||
|
// skip writing empty `_vectors` map
|
||||||
break 'vectors None;
|
break 'vectors None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user