Use a milli version that compute exhaustivelly the number of hits

This commit is contained in:
ManyTheFish 2022-07-13 10:58:39 +02:00
parent 30410e870f
commit 062d17fbc0
4 changed files with 28 additions and 15 deletions

View file

@ -148,6 +148,8 @@ impl Index {
// we align that on the offset too.
let is_finite_pagination = query.offset.is_none() && query.limit.is_none();
search.exhaustive_number_hits(is_finite_pagination);
let (offset, limit) = if is_finite_pagination {
// we start at least at page 1.
let page = max(query.page, 1);