mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08: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: {
|
||||
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();
|
||||
for res in vector_document.iter_vectors() {
|
||||
let (name, entry) = res?;
|
||||
@ -350,6 +346,10 @@ where
|
||||
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();
|
||||
unordered_field_buffer.push((vectors_fid, &vectors_value));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user