Skip to content

Commit

Permalink
correct reverse_sort with embeddings
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <[email protected]>
  • Loading branch information
bedapudi6788 committed Oct 30, 2024
1 parent 1685b77 commit 6ddb08f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion liteindex/query_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
EMAIL = "[email protected]"
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 = []
Expand Down

0 comments on commit 6ddb08f

Please sign in to comment.