lsc 8 months ago
parent
commit
374785d825
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pbl.js

+ 1 - 1
pbl.js

@@ -58,7 +58,7 @@ async function findMatchingContents(discipline, content) {
         const query = `
             SELECT title, id, content,
                    1 - (content_vector <#> $1::vector) AS contentSimilarity
-            FROM (select 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
+            FROM (select 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
             LIMIT 5;
         `;