Skip to content

Commit 6ddb08f

Browse files
committed
correct reverse_sort with embeddings
Signed-off-by: Praneeth Bedapudi <[email protected]>
1 parent 1685b77 commit 6ddb08f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

liteindex/query_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def search_query(
316316
query_str += f" WHERE {' AND '.join(where_conditions)}"
317317

318318
if sort_by_embedding is not None:
319-
query_str += f""" ORDER BY __distance {'ASC' if reversed_sort else 'DESC'}"""
319+
query_str += f""" ORDER BY __distance {'DESC' if reversed_sort else 'ASC'}"""
320320
elif sort_by:
321321
if isinstance(sort_by, list):
322322
query_str += " ORDER BY "

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
AUTHOR = "BEDAPUDI PRANEETH"
2020
REQUIRES_PYTHON = ">=3.6.0"
21-
VERSION = "0.0.3.2.dev4"
21+
VERSION = "0.0.3.2.dev5"
2222

2323
# What packages are required for this module to be executed?
2424
REQUIRED = []

0 commit comments

Comments
 (0)