mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
elastic: set default size
This commit is contained in:
1 parent
6f7154a83a
commit
d11070ff4f
2 files changed
+2
-2
No files matched your search
@@ -32,7 +32,7 @@ bus.on('problem/del', async (domainId, docId) => {
|
||||
});
|
||||
|
||||
global.Hydro.lib.problemSearch = async (domainId, q, opts) => {
|
||||
const allowedSize = system.get('elasic.indexSize');
|
||||
const allowedSize = system.get('elasic-search.indexSize') || 10000;
|
||||
const size = opts?.limit || system.get('pagination.problem');
|
||||
const from = Math.min(allowedSize - size, opts?.skip || 0);
|
||||
const union = await DomainModel.getUnion(domainId);
|
||||
|
||||
Reference in new issue
Block a user