diff --git a/lib/collection/src/collection/point_ops.rs b/lib/collection/src/collection/point_ops.rs index 4aa99848ee..8ec073b380 100644 --- a/lib/collection/src/collection/point_ops.rs +++ b/lib/collection/src/collection/point_ops.rs @@ -416,6 +416,9 @@ impl Collection { timeout: Option, hw_measurement_acc: HwMeasurementAcc, ) -> CollectionResult> { + if request.ids.is_empty() { + return Ok(Vec::new()); + } let with_payload_interface = request .with_payload .as_ref() diff --git a/lib/collection/src/common/fetch_vectors.rs b/lib/collection/src/common/fetch_vectors.rs index 900e6d5f8d..264c7dc52e 100644 --- a/lib/collection/src/common/fetch_vectors.rs +++ b/lib/collection/src/common/fetch_vectors.rs @@ -224,6 +224,10 @@ impl<'coll_name> ReferencedPoints<'coll_name> { let mut collections_names = Vec::new(); let mut vector_retrieves = Vec::new(); for (collection_name, reference_vectors_ids) in self.ids_per_collection { + // do not fetch vectors if there are no reference vectors + if reference_vectors_ids.is_empty() { + continue; + } collections_names.push(collection_name); let points: Vec<_> = reference_vectors_ids.into_iter().collect(); let vector_names: Vec<_> = self