lsc 8 mēneši atpakaļ
vecāks
revīzija
374785d825
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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;
         `;