lsc 5 月之前
父節點
當前提交
3eae14719f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pbl.js

+ 1 - 1
pbl.js

@@ -56,7 +56,7 @@ async function findMatchingContents(discipline, content) {
     try {
         // 使用余弦相似度进行内容向量匹配
         const query = `
-            SELECT title, id, content, file_url
+            SELECT title, id, content, file_url,
                    1 - (content_vector <#> $1::vector) AS contentSimilarity
             FROM (select file_url, title, id, content, content_vector from knowledgefiles as a where top_dir_id in (select id from directory_files where $2 = '' or folder_name = ANY(string_to_array($2, ',')))) as a
             ORDER BY contentSimilarity DESC