diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-04-13 13:29:18 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-04-13 13:29:18 -0700 |
commit | ade7c2d69c9884c493fbc2f66f6a7405c0f4f96b (patch) | |
tree | 39d5fb68b9e959b55ec3a0dbde05375f8e4ef962 /system/api/search.go | |
parent | fe9938cc4ce7885533bf751de5b2eb65a962e99c (diff) |
moving search into own package and renaming funcs throughout
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 } |