Include markdown nodes in full-text norm search
This commit is contained in:
parent
54d07754ac
commit
1825c11569
@ -57,7 +57,7 @@ class Misc extends Controller {
|
|||||||
|
|
||||||
const matching_nodes = await Node.find({
|
const matching_nodes = await Node.find({
|
||||||
PageId: { $in: all_user_page_ids },
|
PageId: { $in: all_user_page_ids },
|
||||||
'Value.Mode': 'norm',
|
'Value.Mode': { $in: ['norm', 'markdown'] },
|
||||||
$text: { $search: query }
|
$text: { $search: query }
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class Misc extends Controller {
|
|||||||
results.push({
|
results.push({
|
||||||
title: node.Value.Value,
|
title: node.Value.Value,
|
||||||
short_title: `${node.Value.Value.slice(0, snip_length)}${node.Value.Value.length > snip_length ? '...' : ''}`,
|
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,
|
id: node.UUID,
|
||||||
associated: {
|
associated: {
|
||||||
title: page.Name,
|
title: page.Name,
|
||||||
|
Loading…
Reference in New Issue
Block a user