Browse Source

change fields and distances position

tumao 3 years ago
parent
commit
2e86c96bde
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/src/utils/search.ts

+ 1 - 1
client/src/utils/search.ts

@@ -19,8 +19,8 @@ export const transferSearchResult = (
     .sort((a, b) => a.score - b.score)
     .sort((a, b) => a.score - b.score)
     .map((r, index) => ({
     .map((r, index) => ({
       rank: index + 1,
       rank: index + 1,
-      distance: r.score,
       ...r,
       ...r,
+      distance: r.score,
     }));
     }));
 
 
   return resultView;
   return resultView;