mirror of
https://github.com/go-shiori/shiori.git
synced 2025-02-21 14:33:19 +08:00
Search bookmarks by its url as well
This commit is contained in:
parent
2e011f78f7
commit
a03239b988
1 changed files with 3 additions and 3 deletions
|
@ -396,10 +396,10 @@ func (db *SQLiteDatabase) SearchBookmarks(keyword string, tags ...string) ([]mod
|
|||
|
||||
// Create where clause for keyword
|
||||
if keyword != "" {
|
||||
whereClause += ` AND id IN (
|
||||
whereClause += ` AND (url LIKE ? OR id IN (
|
||||
SELECT docid id FROM bookmark_content
|
||||
WHERE title MATCH ? OR content MATCH ?)`
|
||||
args = append(args, keyword, keyword)
|
||||
WHERE title MATCH ? OR content MATCH ?))`
|
||||
args = append(args, "%"+keyword+"%", keyword, keyword)
|
||||
}
|
||||
|
||||
// Create where clause for tags
|
||||
|
|
Loading…
Reference in a new issue