bug fixes & improments

This commit is contained in:
undefined committed 2025-03-22 06:25:06 +08:00
1 parent a0f38d9ad1
commit 3a776c3010
11 files changed
+15 -18

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ export default class ElasticSearchService extends Service {
this.client = new Client({ node: config.url });
}
async problemSearch(domainId: string, q: string, opts): ReturnType<ProblemSearch> {
async problemSearch(domainId: string, q: string, opts: Parameters<ProblemSearch>[2] = {}): ReturnType<ProblemSearch> {
const size = opts?.limit || SystemModel.get('pagination.problem');
const from = Math.min(this.config.indexSize - size, opts?.skip || 0);
const res = await this.client.search({