Do search on all indexed fields.
This commit is contained in:
parent
7d20941765
commit
b676e2f949
@ -64,7 +64,7 @@ func main() {
|
||||
|
||||
query := c.Query("q")
|
||||
|
||||
stm, err := db.Prepare("SELECT note_id, title, top_level_title, is_done, is_todo FROM note_search WHERE title LIKE ?")
|
||||
stm, err := db.Prepare("SELECT note_id, title, top_level_title, is_done, is_todo FROM note_search(?)")
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@ -77,7 +77,7 @@ func main() {
|
||||
|
||||
results := make([]map[string]string, 0)
|
||||
|
||||
rows, err := stm.Query(fmt.Sprintf("%%%v%%", query))
|
||||
rows, err := stm.Query(query)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
c.JSON(500, gin.H{
|
||||
|
Loading…
Reference in New Issue
Block a user