Skip to content

Commit

Permalink
fix: fix default vector distance matrix (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
joein authored Oct 11, 2024
1 parent 2cd8214 commit f2494ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qdrant_client/local/local_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,12 @@ def _search_distance_matrix(
for sampled_id_index, sampled in enumerate(samples):
ids_to_includes = [x for (i, x) in enumerate(ids) if i != sampled_id_index]
sampling_filter = _include_ids_in_filter(query_filter, ids_to_includes)
search_vector = sampled.vector[search_in_vector_name]
sampled_vector = sampled.vector
search_vector = (
sampled_vector[search_in_vector_name]
if isinstance(sampled_vector, dict)
else sampled_vector
)
samples_scores = self.search(
query_vector=(search_in_vector_name, search_vector),
query_filter=sampling_filter,
Expand Down

0 comments on commit f2494ca

Please sign in to comment.