diff options
-rw-r--r-- | internal/index/search.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/index/search.go b/internal/index/search.go index c5b8c6b..e7cec4c 100644 --- a/internal/index/search.go +++ b/internal/index/search.go @@ -109,7 +109,7 @@ func (index *ReadIndex) search( return nil, errors.WithMessage(err, "failed to execute search query") } - results := make([]DocumentMatch, min(ResultsPerPage, bleveResult.Total)) + results := make([]DocumentMatch, bleveResult.Hits.Len()) var buf bytes.Buffer for i, result := range bleveResult.Hits { results[i].DocumentMatch = bleveResult.Hits[i] |