core&elastic: fix search by id

This commit is contained in:
undefined committed 2026-08-24 15:25:11 +08:00
1 parent e7a263c96d
commit f9fb8dcbf1
2 files changed
+2

No files matched your search

+1
View File
@@ -67,6 +67,7 @@ const defaultSearch = async (domainId: string, q: string, options?: ProblemSearc
pdoc = await problem.get(domainId, +q.substring(1), projection);
if (pdoc) pdocs.unshift(pdoc);
}
if (pdocs.length > (options.limit || system.get('pagination.problem'))) pdocs.pop();
}
return {
hits: Array.from(new Set(pdocs.map((i) => `${i.domainId}/${i.docId}`))),