mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-02 09:35:45 +01:00
Remove _vectors
from fid map when there are no vectors in sight
This commit is contained in:
parent
b1f8aec348
commit
477077bdc2
@ -322,10 +322,6 @@ where
|
|||||||
'inject_vectors: {
|
'inject_vectors: {
|
||||||
let Some(vector_document) = vector_document else { break 'inject_vectors };
|
let Some(vector_document) = vector_document else { break 'inject_vectors };
|
||||||
|
|
||||||
let vectors_fid = fields_ids_map
|
|
||||||
.id_or_insert(RESERVED_VECTORS_FIELD_NAME)
|
|
||||||
.ok_or(UserError::AttributeLimitReached)?;
|
|
||||||
|
|
||||||
let mut vectors = BTreeMap::new();
|
let mut vectors = BTreeMap::new();
|
||||||
for res in vector_document.iter_vectors() {
|
for res in vector_document.iter_vectors() {
|
||||||
let (name, entry) = res?;
|
let (name, entry) = res?;
|
||||||
@ -350,6 +346,10 @@ where
|
|||||||
break 'inject_vectors;
|
break 'inject_vectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let vectors_fid = fields_ids_map
|
||||||
|
.id_or_insert(RESERVED_VECTORS_FIELD_NAME)
|
||||||
|
.ok_or(UserError::AttributeLimitReached)?;
|
||||||
|
|
||||||
vectors_value = serde_json::value::to_raw_value(&vectors).unwrap();
|
vectors_value = serde_json::value::to_raw_value(&vectors).unwrap();
|
||||||
unordered_field_buffer.push((vectors_fid, &vectors_value));
|
unordered_field_buffer.push((vectors_fid, &vectors_value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user