updated search handler

This commit is contained in:
Torkel Ödegaard 2015-06-03 14:53:40 +02:00
parent c821568ac7
commit 83279604c6

View File

@ -1,7 +1,6 @@
package search package search
import ( import (
"fmt"
"path/filepath" "path/filepath"
"sort" "sort"
@ -68,9 +67,8 @@ func searchHandler(query *Query) error {
// sort main result array // sort main result array
sort.Sort(hits) sort.Sort(hits)
fmt.Printf("Length: %d", len(hits))
if len(hits) > query.Limit { if len(hits) > query.Limit {
hits = hits[0 : query.Limit-1] hits = hits[0:query.Limit]
} }
// sort tags // sort tags