From 54f971532a87a47dfc58fd5c96710f15f7df2221 Mon Sep 17 00:00:00 2001 From: Adrian Smith Date: Wed, 31 Jan 2024 09:12:33 -0800 Subject: [PATCH] Return ordered results when searching. --- src/com/phronemophobic/usearch.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/phronemophobic/usearch.clj b/src/com/phronemophobic/usearch.clj index d9348d4..adabd04 100644 --- a/src/com/phronemophobic/usearch.clj +++ b/src/com/phronemophobic/usearch.clj @@ -300,7 +300,7 @@ distances* (Memory. (* 4 n))] (let [found (with-error (raw/usearch_search index vec (vector-kind vec) n keys* distances*))] - (into {} + (into [] (map (fn [i] [(.getLong keys* (* 8 i)) (.getFloat distances* (* 4 i))]))