diff --git a/scripts/search-server/server.go b/scripts/search-server/server.go index 86a7eb0..8914956 100644 --- a/scripts/search-server/server.go +++ b/scripts/search-server/server.go @@ -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{