🎨 虚拟引用搜索关键字最多支持 搜索结果显示数 的 8 倍 Fix https://github.com/siyuan-note/siyuan/issues/6603

This commit is contained in:
Liang Ding 2022-11-16 15:47:36 +08:00
parent 732ca0b726
commit 5171d795f3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 4 additions and 4 deletions

View file

@ -109,9 +109,9 @@ func getVirtualRefKeywords(docName string) (ret []string) {
// 虚拟引用排除当前文档名 https://github.com/siyuan-note/siyuan/issues/4537
ret = gulu.Str.ExcludeElem(ret, []string{docName})
ret = prepareMarkKeywords(ret)
// 虚拟引用搜索关键字最多支持 `512` 个 https://github.com/siyuan-note/siyuan/issues/6603
if 512 < len(ret) {
ret = ret[:512]
// 虚拟引用搜索关键字最多支持 `搜索结果显示数` 的 8 倍 https://github.com/siyuan-note/siyuan/issues/6603
if Conf.Search.Limit*8 < len(ret) {
ret = ret[:Conf.Search.Limit*8]
}
return
}

View file

@ -49,7 +49,7 @@ func QueryVirtualRefKeywords(name, alias, anchor, doc bool) (ret []string) {
func queryRefTexts() (ret []string) {
ret = []string{}
sqlStmt := "SELECT DISTINCT content FROM refs LIMIT 1024"
sqlStmt := "SELECT DISTINCT content FROM refs LIMIT 10240"
rows, err := query(sqlStmt)
if nil != err {
logging.LogErrorf("sql query failed: %s", sqlStmt, err)