Skip to content

Commit

Permalink
Fix to improve search result collection
Browse files Browse the repository at this point in the history
  • Loading branch information
olivere committed Jun 16, 2021
1 parent 7afbb00 commit a7874d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Expand Up @@ -32,6 +32,7 @@ arthurgustin [@arthurgustin](https://github.com/arthurgustin)
Bas van Dijk [@basvandijk](https://github.com/basvandijk)
Benjamin Fernandes [@LotharSee](https://github.com/LotharSee)
Benjamin Zarzycki [@kf6nux](https://github.com/kf6nux)
bestgopher [@bestgopher](https://github.com/bestgopher)
Björn Gerdau [@kernle32dll](https://github.com/kernle32dll)
Boris Popovschi [@Zyqsempai](https://github.com/Zyqsempai)
Bowei Xu [@vancexu](https://github.com/vancexu)
Expand Down
2 changes: 1 addition & 1 deletion search.go
Expand Up @@ -691,7 +691,7 @@ func (r *SearchResult) Each(typ reflect.Type) []interface{} {
if r.Hits == nil || r.Hits.Hits == nil || len(r.Hits.Hits) == 0 {
return nil
}
var slice []interface{}
slice := make([]interface{}, 0, len(r.Hits.Hits))
for _, hit := range r.Hits.Hits {
v := reflect.New(typ).Elem()
if hit.Source == nil {
Expand Down

0 comments on commit a7874d0

Please sign in to comment.