elastic: set default size

This commit is contained in:
undefined committed 2022-05-13 15:36:25 +08:00
1 parent 6f7154a83a
commit d11070ff4f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/elastic-search",
"version": "1.0.4",
"version": "1.0.5",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro",
"author": "undefined <i@undefined.moe>",
+1 -1
View File
@@ -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);