Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-11-16 15:58:47 +08:00
commit 1bb3870243
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)