updated search handler

This commit is contained in:
Torkel Ödegaard
2015-06-03 14:53:52 +02:00
parent c821568ac7
commit 83279604c6
+1 -3
View File
@@ -1,7 +1,6 @@
package search
import (
"fmt"
"path/filepath"
"sort"
@@ -68,9 +67,8 @@ func searchHandler(query *Query) error {
// sort main result array
sort.Sort(hits)
fmt.Printf("Length: %d", len(hits))
if len(hits) > query.Limit {
hits = hits[0 : query.Limit-1]
hits = hits[0:query.Limit]
}
// sort tags