Allow paging through search results #1222
Labels
area: back-end
area: elasticsearch
Elasticsearch Related issues and pull requests
area: front-end
type: bug
Something isn't working
In #1217 I'm adding some data fetching paging logic using https://swr.vercel.app. It could also be used for our search front-end (e.g., SearchPage.jsx) to allow us to page through the results we get back from our backend.
To do this, we need to pass the data to our
<Timeline>
component in "pages" like this:The data we get back from the server for a query looks like this:
See #1221, where this might change a bit. We know the number of
results
, and could request chunks of it using thefrom
andsize
options in our elasticsearch query. We'd have to update our/query
route to accept params with this info, and then do something like this https://swr.vercel.app/docs/pagination#example-2-cursor-or-offset-based-paginated-api.The text was updated successfully, but these errors were encountered: