mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 虚拟引用搜索关键字最多支持 搜索结果显示数 的 8 倍 Fix https://github.com/siyuan-note/siyuan/issues/6603
This commit is contained in:
parent
732ca0b726
commit
5171d795f3
2 changed files with 4 additions and 4 deletions
|
|
@ -109,9 +109,9 @@ func getVirtualRefKeywords(docName string) (ret []string) {
|
||||||
// 虚拟引用排除当前文档名 https://github.com/siyuan-note/siyuan/issues/4537
|
// 虚拟引用排除当前文档名 https://github.com/siyuan-note/siyuan/issues/4537
|
||||||
ret = gulu.Str.ExcludeElem(ret, []string{docName})
|
ret = gulu.Str.ExcludeElem(ret, []string{docName})
|
||||||
ret = prepareMarkKeywords(ret)
|
ret = prepareMarkKeywords(ret)
|
||||||
// 虚拟引用搜索关键字最多支持 `512` 个 https://github.com/siyuan-note/siyuan/issues/6603
|
// 虚拟引用搜索关键字最多支持 `搜索结果显示数` 的 8 倍 https://github.com/siyuan-note/siyuan/issues/6603
|
||||||
if 512 < len(ret) {
|
if Conf.Search.Limit*8 < len(ret) {
|
||||||
ret = ret[:512]
|
ret = ret[:Conf.Search.Limit*8]
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ func QueryVirtualRefKeywords(name, alias, anchor, doc bool) (ret []string) {
|
||||||
|
|
||||||
func queryRefTexts() (ret []string) {
|
func queryRefTexts() (ret []string) {
|
||||||
ret = []string{}
|
ret = []string{}
|
||||||
sqlStmt := "SELECT DISTINCT content FROM refs LIMIT 1024"
|
sqlStmt := "SELECT DISTINCT content FROM refs LIMIT 10240"
|
||||||
rows, err := query(sqlStmt)
|
rows, err := query(sqlStmt)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
logging.LogErrorf("sql query failed: %s", sqlStmt, err)
|
logging.LogErrorf("sql query failed: %s", sqlStmt, err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue