Skip to content

Commit

Permalink
Merge pull request #182 from KU-niverse/fix/search
Browse files Browse the repository at this point in the history
Fix/search
  • Loading branch information
youngsupchoi authored May 28, 2024
2 parents bc210ff + e46806c commit 131fe5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions models/questionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ Question.getQuestionSearchByQuery = async (query) => {
FROM answers
GROUP BY question_id
) a ON q.id = a.question_id
WHERE q.content LIKE ?
WHERE MATCH(q.content) AGAINST(? IN BOOLEAN MODE)
ORDER BY q.created_at DESC`,
[`%${query}%`]
[query]
);
return result[0];
};
Expand Down
2 changes: 1 addition & 1 deletion models/wikiModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Wiki_docs {
WHERE user_id = ? -- 여기에 현재 사용자의 ID를 삽입
) AS wiki_favorites
ON wiki_docs.id = wiki_favorites.doc_id
WHERE MATCH(wiki_docs.title, wiki_docs.recent_filtered_content) AGAINST (? IN NATURAL LANGUAGE MODE);
WHERE MATCH(wiki_docs.title, wiki_docs.recent_filtered_content) AGAINST (? IN BOOLEAN MODE);
`,
[user_id, title]
);
Expand Down

0 comments on commit 131fe5a

Please sign in to comment.