Closed Haans001 closed 1 year ago
Offset is meant to be used in tandem with length
, not with hitsPerPage
, all widgets inside React InstantSearch Hooks (pagination, infiniteHits, hitsPerPage) therefore use only hitsPerPage.
What's the experience you're creating?
We are trying to build some kind of nested list and to make it look good, we have to parse get around 1000 documents per page. The idea was to make custom pagination by manipulating offset by 1000 * page number
. Using pagination hooks is not possible because we cannot load more then 1000 hits to pagination in meilisearch client.
The limitation to 1000 hits is reasonable (it's the same for Algolia) to keep performance at a decent pace. What you could do is use page / hitsPerPage in the application, but transform those to length/offset in the search client directly.
As your question involves Meilisearch, and not Algolia, I'll close this issue, as the limitation isn't on React InstantSearch' side further
Have a nice day!
🐛 Bug description
Hello, we are trying to use
useConfigure
hook to offset our search by some number. However passingoffset
property to hook args object, doesn't seem to do anything. Hook usage:hitsPerPage
property is working as expected.It's also worth to mention that
offset
isn't even working on the library playground. https://codesandbox.io/s/github/algolia/create-instantsearch-app/tree/templates/react-instantsearch🔍 Bug reproduction
Steps to reproduce the behavior:
offset
property toConfigure hitsPerPage={8} />
component💭 Expected behavior
Search results will get offseted with
offset
property given touseConfigure
hook or<Configure />
component.Environment