diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-04-14 17:34:16 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-04-14 17:34:16 -0700 |
commit | 1df78f4390b0153f48108ae1aa504719730d2b2f (patch) | |
tree | 7f9da51f9669ee4fba8dd2d82ec6618e157fe6b6 /system/api/search.go | |
parent | 167cbd869a26e2798ae56653c34eeb65d16e1d92 (diff) | |
parent | fcb69059f0ef206efafffa6abc10dd4245280d12 (diff) |
Merge branch 'master' of https://github.com/ponzu-cms/ponzu
Diffstat (limited to 'system/api/search.go')
-rw-r--r-- | system/api/search.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/system/api/search.go b/system/api/search.go index c743d9f..9c7f0ae 100644 --- a/system/api/search.go +++ b/system/api/search.go @@ -8,6 +8,7 @@ import ( "github.com/ponzu-cms/ponzu/system/db" "github.com/ponzu-cms/ponzu/system/item" + "github.com/ponzu-cms/ponzu/system/search" ) func searchContentHandler(res http.ResponseWriter, req *http.Request) { @@ -42,8 +43,8 @@ func searchContentHandler(res http.ResponseWriter, req *http.Request) { } // execute search for query provided, if no index for type send 404 - matches, err := db.SearchType(t, q) - if err == db.ErrNoSearchIndex { + matches, err := search.TypeQuery(t, q) + if err == search.ErrNoIndex { res.WriteHeader(http.StatusNotFound) return } |