diff options
-rw-r--r-- | system/api/search.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/api/search.go b/system/api/search.go index 25a1bae..c743d9f 100644 --- a/system/api/search.go +++ b/system/api/search.go @@ -61,6 +61,11 @@ func searchContentHandler(res http.ResponseWriter, req *http.Request) { return } + // if we have matches, push the first as its matched by relevance + if len(bb) > 0 { + push(res, req, it, bb[0]) + } + var result = []json.RawMessage{} for i := range bb { result = append(result, bb[i]) |