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

@ -28,7 +28,7 @@ lazy_static = "1.4.0"
log = "0.4.17"
meilisearch-auth = { path = "../meilisearch-auth" }
meilisearch-types = { path = "../meilisearch-types" }
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.33.4", default-features = false }
milli = { git = "https://github.com/meilisearch/milli.git", branch = "main", default-features = false }
mime = "0.3.16"
num_cpus = "1.13.1"
obkv = "0.2.0"

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);