mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Improve searching for move blocks
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
12ebc120a0
commit
190ab07b98
2 changed files with 14 additions and 2 deletions
|
|
@ -139,7 +139,7 @@ func (box *Box) moveCorruptedData(filePath string) {
|
|||
logging.LogWarnf("moved corrupted data file [%s] to [%s]", filePath, to)
|
||||
}
|
||||
|
||||
func SearchDocsByKeyword(keyword string, flashcard bool) (ret []map[string]string) {
|
||||
func SearchDocsByKeyword(keyword string, flashcard bool, excludeIDs []string) (ret []map[string]string) {
|
||||
ret = []map[string]string{}
|
||||
|
||||
var deck *riff.Deck
|
||||
|
|
@ -187,6 +187,10 @@ func SearchDocsByKeyword(keyword string, flashcard bool) (ret []map[string]strin
|
|||
}
|
||||
}
|
||||
|
||||
if 0 < len(excludeIDs) {
|
||||
condition += fmt.Sprintf(" AND root_id NOT IN ('%s')", strings.Join(excludeIDs, "', '"))
|
||||
}
|
||||
|
||||
rootBlocks = sql.QueryRootBlockByCondition(condition, Conf.Search.Limit)
|
||||
} else {
|
||||
for _, box := range boxes {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue