sonic: search by problem tag

This commit is contained in:
undefined committed 2022-03-12 20:57:37 +08:00
1 parent d60f31c427
commit 46179ab3e5
3 files changed
+7 -4

No files matched your search

+4 -1
View File
@@ -15,7 +15,10 @@ export async function run({ domainId }, report) {
const tasks = [];
for (const did of [pdoc.domainId, ...union.map((j) => j._id)]) {
tasks.push(
pdoc.title && sonic.push('problem', `${did}@title`, `${pdoc.domainId}/${pdoc.docId}`, `${pdoc.pid || ''} ${pdoc.title}`),
pdoc.title && sonic.push(
'problem', `${did}@title`, `${pdoc.domainId}/${pdoc.docId}`,
`${pdoc.pid || ''} ${pdoc.title} ${pdoc.tag.join(' ')}`,
),
pdoc.content.toString() && sonic.push('problem', `${did}@content`, `${pdoc.domainId}/${pdoc.docId}`, pdoc.content.toString()),
);
}