mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
✨ Support for searching asset content https://github.com/siyuan-note/siyuan/issues/8874
This commit is contained in:
parent
e66676598f
commit
253b228bb0
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ func fullTextSearchAssetContentCountByRegexp(exp, typeFilter string) (matchedAss
|
|||
func fullTextSearchAssetContentByFTS(query, typeFilter, orderBy string, beforeLen, page, pageSize int) (ret []*AssetContent, matchedAssetCount int) {
|
||||
table := "asset_contents_fts_case_insensitive"
|
||||
projections := "id, name, ext, path, size, updated, " +
|
||||
"highlight(" + table + ", 6, '<mark>', '</mark>') AS content"
|
||||
"snippet(" + table + ", 6, '<mark>', '</mark>', '...', 64) AS content"
|
||||
stmt := "SELECT " + projections + " FROM " + table + " WHERE (`" + table + "` MATCH '" + buildAssetContentColumnFilter() + ":(" + query + ")'"
|
||||
stmt += ") AND ext IN " + typeFilter
|
||||
stmt += " " + orderBy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue