Fangrui Liu commited on
Commit
c7cf43e
1 Parent(s): 6fdd8dc

update order by

Browse files
Files changed (1) hide show
  1. query_model.py +1 -1
query_model.py CHANGED
@@ -92,7 +92,7 @@ def simple_query(client, xq, IMG_DB_NAME, OBJ_DB_NAME, thresh=0.08, topk=10):
92
  FROM {OBJ_DB_NAME}
93
  JOIN {IMG_DB_NAME}
94
  ON {IMG_DB_NAME}.img_id = {OBJ_DB_NAME}.img_id
95
- {_thresh} ORDER BY dist LIMIT {topk}
96
  """)
97
  subq_str = " UNION ALL ".join(subq_str)
98
  q_str = f"""
 
92
  FROM {OBJ_DB_NAME}
93
  JOIN {IMG_DB_NAME}
94
  ON {IMG_DB_NAME}.img_id = {OBJ_DB_NAME}.img_id
95
+ {_thresh} ORDER BY dist DESC LIMIT {topk}
96
  """)
97
  subq_str = " UNION ALL ".join(subq_str)
98
  q_str = f"""