Open justin5267 opened 10 months ago
Could you open the browser's network tab, then do an action that triggers the search, then open that request in the network tab, copy both the request parameters and the response from Typesense and paste it here?
Thanks a lot,the request parameters and the response are as follows:
Ah, I think there might be a misunderstanding about what limit_hits does... It's meant to control the total number of hits that can be retrieved via pagination. So for eg, since you've set limit_hits
to 2000, even though 2758 results were found, if you try to fetch the 2001th record via pagination, Typesense will throw an error.
So limit_hits
is meant mainly for protecting against someone scraping all results in your dataset. This is also why you'd want to use limit_hits
embedded inside a Scoped Search API key, so it cannot be modified by a malicious actor on the client side.
Great, it really works, I misunderstood it.
Description
I've configured the limit_hits, but it doesn't work,still returning all hits.
Steps to reproduce
I'm using instantsearch.js, and all other parameters are functioning correctly.
Expected Behavior
rutrun limited hits
Actual Behavior
return all the hits
Metadata
Typesense Version:0.25 typesense-instantsearch-adapter Version:2.7.1
const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({ server: { apiKey: "XXX", nodes: [ { host: "XXX", port: "443", protocol: "https", }, ], cacheSearchResultsForSeconds: 2 * 60, },
});