Confusing nbHits #394
Replies: 5 comments 9 replies
-
From previous discussions i've read so far, I liked the Keeping even an approximate number of hits can be useful to display this kind of information on a page. @bidoubiwa also mentioned that |
Beta Was this translation helpful? Give feedback.
-
I just reread this discussion in detail and I agree with most of the points made by @bidoubiwa here. FYI, I'm writing a document explaining our choice for v0.28 regarding the pagination which is mainly to have an API naming to better guide users by indicating in a natural way that finite pagination is not supported by Meilisearch for various reasons. In terms of naming, it's clear that My proposal would be:
We often talk about matches when we relate to matched documents where |
Beta Was this translation helpful? Give feedback.
-
Among the ideas so far I lean towards Do we need to use |
Beta Was this translation helpful? Give feedback.
-
Final surveyKnowing the 😁 Let's vote! |
Beta Was this translation helpful? Give feedback.
-
Following the v0.28 release, this discussion is now locked. We encourage you to create a new thread if needed. Thank you ✨ |
Beta Was this translation helpful? Give feedback.
-
Sorry if there is already an open discussion regarding this, I have not found it.
nbHits
is really confusing for multiple users who expect to get the number exact of hits (with nolimit
applied on it) which is not the case.Even the documentation is not explicit regarding this: https://docs.meilisearch.com/reference/api/search.html#response
nbHits
is not exhaustive by default, but only an approximation. IfexhaustiveNbHits
istrue
, then, thenbHits
is exact. However the current search engine (since v0.21.0) always returnsfalse
asexhaustiveNbHits
value, sonbHits
is always an approximation.One of the most problematic consequences is the users based on the
nbHits
value to build finished pagination. We had to create an issue to avoid this, cf meilisearch/documentation#561Here is the old issue regarding this problem on Meilisearch's repo side: meilisearch/meilisearch#1120
The goal of this discussion here is to let the users explain their usage with
nbHits
: As a user, what is the goal you attempt to reach by usingnbHits
? What is your usecase?This would definitely help the product team redesign this feature 🙏
Beta Was this translation helpful? Give feedback.
All reactions