Limiting search result return to fixed number of results

Been searching without success, so hope someone can help me out either with a solution or telling me its a non-issue.

In short we have a search pulling back 10k results, of which we only use the top 5, filtered using vue code provided by argolia. I’ve inherited this set up, and am learning argolia. The concern put to me is that we are pulling a large block of data just to use a small amount at the front end.

I can see how you can reduce the load by filtering field attributes, but not the number of results returned. I was thinking about dates, but a way to get just the top 5 results returned would be best.

Hi @lee.chamberlain,

You can use pagination to limit the results.

Or you could use ‘offset’ and ‘length’ to get a subset of results.

Let us know how this works for you!

You could also use hitsPerPage: 5 so that you only see the first 5 results: