Include markdown nodes in full-text norm search
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

master
Garrett Mills 4 years ago
parent 54d07754ac
commit 1825c11569
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

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

Loading…
Cancel
Save