diff --git a/wiki/hooks.py b/wiki/hooks.py index 3232723e..c13ebfb6 100644 --- a/wiki/hooks.py +++ b/wiki/hooks.py @@ -167,3 +167,11 @@ "extras": ["route"], }, } + +frappe_search_doctypes = { + "Wiki Page": { + "title": "title", + "content": ["content"], + "fields": ["route"], + }, +} diff --git a/wiki/public/js/render_wiki.js b/wiki/public/js/render_wiki.js index f5172ac0..d0ff9239 100644 --- a/wiki/public/js/render_wiki.js +++ b/wiki/public/js/render_wiki.js @@ -599,7 +599,7 @@ window.RenderWiki = class RenderWiki extends Wiki { frappe .call({ - method: "frappe_search.core.search", + method: "frappe_search.api.search", args: { query: searchInput.val(), path: window.location.pathname, @@ -612,10 +612,9 @@ window.RenderWiki = class RenderWiki extends Wiki { if (results.length === 0) { dropdown_html = `
No results found
`; } else { - console.log(results); dropdown_html = results .map((r) => { - return ` + return `
${r.highlighted_title || r.title}
${ res.message.search_engine === "frappe_web_search"