Skip to content

Commit 267aa44

Browse files
committed
fix: add distance sort back
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent 1ed2f82 commit 267aa44

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

context_chat_backend/vectordb/pgvector.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ def _similarity_search(
560560
self.client.CollectionStore,
561561
self.client.EmbeddingStore.collection_id == self.client.CollectionStore.uuid,
562562
)
563+
.order_by(sa.asc('distance'))
563564
.limit(k) # Get up to k results from the batch
564565
)
565566

0 commit comments

Comments
 (0)