From 2319b67fef30af8b847d7ad5b0d6a1cf125570da Mon Sep 17 00:00:00 2001 From: tomleb Date: Mon, 3 Jul 2017 21:43:09 -0400 Subject: [PATCH] Fix wrong totalhits value (#1103) --- common/torrent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/torrent.go b/common/torrent.go index fdbe6e85..61bc76fe 100644 --- a/common/torrent.go +++ b/common/torrent.go @@ -248,7 +248,7 @@ func (p *TorrentParam) Find(client *elastic.Client) (int64, []model.Torrent, err log.Infof("Cannot unmarshal elasticsearch torrent: %s", err) } } - return torrentCount, torrents, nil + return result.TotalHits(), torrents, nil }