mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
updated search handler
This commit is contained in:
parent
c821568ac7
commit
83279604c6
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user