Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-03 17:50:25 +08:00
parent 7154879ddc
commit c917626d47
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -187,8 +187,8 @@ func SearchDocsByKeyword(keyword string, flashcard bool, excludeIDs []string) (r
}
}
if 0 < len(excludeIDs) {
condition += fmt.Sprintf(" AND root_id NOT IN ('%s')", strings.Join(excludeIDs, "', '"))
for _, excludeID := range excludeIDs {
condition += fmt.Sprintf(" AND path NOT LIKE '%%%s%%' ", excludeID)
}
rootBlocks = sql.QueryRootBlockByCondition(condition, Conf.Search.Limit)