This commit is contained in:
Liang Ding 2022-08-28 10:43:56 +08:00
parent 51eedd11eb
commit f9befd8d13
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 97 additions and 101 deletions

View file

@ -718,7 +718,7 @@ func fullTextSearchHistory(query string, page int) (ret []*History, matchedBlock
query = stringQuery(query)
table := "histories_fts_case_insensitive"
projections := "type, op, title, content, path"
projections := "type, op, title, content, path, created"
stmt := "SELECT " + projections + " FROM " + table + " WHERE " + table + " MATCH '{title content}:(" + query + ")'"
stmt += " ORDER BY created DESC LIMIT " + strconv.Itoa(page)
sqlHistories := sql.SelectHistoriesRawStmt(stmt)