mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-29 08:14:26 +01:00
Fix retrieveVectors when explicitly passed in displayed attributes without any document containing _vectors
This commit is contained in:
parent
a90563df3f
commit
e44e7b5e81
@ -1195,8 +1195,13 @@ impl<'a> HitMaker<'a> {
|
|||||||
let vectors_is_hidden = match (&displayed_ids, vectors_fid) {
|
let vectors_is_hidden = match (&displayed_ids, vectors_fid) {
|
||||||
// displayed_ids is a wildcard, so `_vectors` can be displayed regardless of its fid
|
// displayed_ids is a wildcard, so `_vectors` can be displayed regardless of its fid
|
||||||
(None, _) => false,
|
(None, _) => false,
|
||||||
// displayed_ids is a finite list, and `_vectors` cannot be part of it because it is not an existing field
|
// vectors has no fid, so check its explicit name
|
||||||
(Some(_), None) => true,
|
(Some(_), None) => {
|
||||||
|
// unwrap as otherwise we'd go to the first one
|
||||||
|
let displayed_names = index.displayed_fields(rtxn)?.unwrap();
|
||||||
|
!displayed_names
|
||||||
|
.contains(&milli::vector::parsed_vectors::RESERVED_VECTORS_FIELD_NAME)
|
||||||
|
}
|
||||||
// displayed_ids is a finit list, so hide if `_vectors` is not part of it
|
// displayed_ids is a finit list, so hide if `_vectors` is not part of it
|
||||||
(Some(map), Some(vectors_fid)) => map.contains(&vectors_fid),
|
(Some(map), Some(vectors_fid)) => map.contains(&vectors_fid),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user