From 5ca70f519551065c893c35aec4b12058df1d1a43 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 16 Feb 2023 15:12:33 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20`=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=B0`=20=E6=9C=80=E5=B0=8F=E9=99=90?= =?UTF-8?q?=E5=88=B6=E4=B8=BA=2032=20https://github.com/siyuan-note/siyuan?= =?UTF-8?q?/issues/7384?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/setting.go | 4 ++-- kernel/model/conf.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/api/setting.go b/kernel/api/setting.go index 13e870b2e..a69c07528 100644 --- a/kernel/api/setting.go +++ b/kernel/api/setting.go @@ -209,8 +209,8 @@ func setSearch(c *gin.Context) { return } - if 1 > s.Limit { - s.Limit = 64 + if 32 > s.Limit { + s.Limit = 32 } oldCaseSensitive := model.Conf.Search.CaseSensitive diff --git a/kernel/model/conf.go b/kernel/model/conf.go index 722d61040..ee3e50f90 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -293,6 +293,9 @@ func InitConf() { if 1 > Conf.Search.Limit { Conf.Search.Limit = 64 } + if 32 > Conf.Search.Limit { + Conf.Search.Limit = 32 + } if 1 > Conf.Search.BacklinkMentionKeywordsLimit { Conf.Search.BacklinkMentionKeywordsLimit = 512 }