From 6ddb08f2899e1743d2842fcfdfee1e76c0b14a19 Mon Sep 17 00:00:00 2001 From: Praneeth Bedapudi Date: Wed, 30 Oct 2024 22:57:13 +0530 Subject: [PATCH] correct reverse_sort with embeddings Signed-off-by: Praneeth Bedapudi --- liteindex/query_parser.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/liteindex/query_parser.py b/liteindex/query_parser.py index df7fcdb..a91ee21 100644 --- a/liteindex/query_parser.py +++ b/liteindex/query_parser.py @@ -316,7 +316,7 @@ def search_query( query_str += f" WHERE {' AND '.join(where_conditions)}" if sort_by_embedding is not None: - query_str += f""" ORDER BY __distance {'ASC' if reversed_sort else 'DESC'}""" + query_str += f""" ORDER BY __distance {'DESC' if reversed_sort else 'ASC'}""" elif sort_by: if isinstance(sort_by, list): query_str += " ORDER BY " diff --git a/setup.py b/setup.py index 8e622be..e6c4b48 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ EMAIL = "praneeth@bpraneeth.com" AUTHOR = "BEDAPUDI PRANEETH" REQUIRES_PYTHON = ">=3.6.0" -VERSION = "0.0.3.2.dev4" +VERSION = "0.0.3.2.dev5" # What packages are required for this module to be executed? REQUIRED = []