elastic: set default size

pull/402/head
undefined 2 years ago
parent 6f7154a83a
commit d11070ff4f

@ -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>",

@ -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);

Loading…
Cancel
Save