解决 meilisearch 的最大输出问题,默认只能1000条
官方文档不清楚 好像是写错了
解决办法
As I suspected, Meilisearch did have a default 1000 results per search limit. This is configured by the maxTotalHits pagination option. To quote from their documentation :
https://docs.meilisearch.com/reference/api/settings.html#pagination
maxTotalHits takes priority over search parameters such as limit, offset, hitsPerPage, and page.
For example, if you set maxTotalHits to 100, you will not be able to access search results beyond 100 no matter the value configured for offset.
To update my pagination's limits, I just ran
curl \
-X PATCH 'http://localhost:7700/indexes/my-index/settings/pagination' \
-H 'Authorization: Bearer my-meilisearch-key' \
-H 'Content-type: application/json' \
-d '{"maxTotalHits": 20000}'