mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes & improments
This commit is contained in:
11 files changed
+15
-18
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user