Include markdown nodes in full-text norm search
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Garrett Mills 2020-10-16 12:31:51 -05:00
parent 54d07754ac
commit 1825c11569
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -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,