Commit 83279604 by Torkel Ödegaard

updated search handler

parent c821568a
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment