From 1825c115695f05ffb1b290d295d2b1d55370083c Mon Sep 17 00:00:00 2001 From: garrettmills Date: Fri, 16 Oct 2020 12:31:51 -0500 Subject: [PATCH] Include markdown nodes in full-text norm search --- app/controllers/api/v1/Misc.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/Misc.controller.js b/app/controllers/api/v1/Misc.controller.js index 37d0bc2..5d0196f 100644 --- a/app/controllers/api/v1/Misc.controller.js +++ b/app/controllers/api/v1/Misc.controller.js @@ -57,7 +57,7 @@ class Misc extends Controller { const matching_nodes = await Node.find({ PageId: { $in: all_user_page_ids }, - 'Value.Mode': 'norm', + 'Value.Mode': { $in: ['norm', 'markdown'] }, $text: { $search: query } }) @@ -66,7 +66,7 @@ class Misc extends Controller { results.push({ title: node.Value.Value, short_title: `${node.Value.Value.slice(0, snip_length)}${node.Value.Value.length > snip_length ? '...' : ''}`, - type: 'node', + type: node.Value.Mode === 'norm' ? 'node' : 'markdown', id: node.UUID, associated: { title: page.Name,