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
@@ -60,6 +60,7 @@ export default class ElasticSearchService extends Service {
pdoc = await ProblemModel.get(domainId, +q.substring(1), ProblemModel.PROJECTION_LIST);
if (pdoc) hits.unshift(`${pdoc.domainId}/${pdoc.docId}`);
}
if (hits.length > size) hits.pop();
}
return {
countRelation: typeof res.hits.total === 'number' ? 'eq' : res.hits.total.relation,