mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&elastic: fix search by id
This commit is contained in:
2 files changed
+2
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user