mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-07 02:20:55 -05:00
Fix query per vector to not generate an empty retrieve request (#5910)
This commit is contained in:
@@ -416,6 +416,9 @@ impl Collection {
|
||||
timeout: Option<Duration>,
|
||||
hw_measurement_acc: HwMeasurementAcc,
|
||||
) -> CollectionResult<Vec<RecordInternal>> {
|
||||
if request.ids.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
let with_payload_interface = request
|
||||
.with_payload
|
||||
.as_ref()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user