Home > other >  Laravel/Scout - How to get total number of documents?
Laravel/Scout - How to get total number of documents?

Time:10-19

I'm using meilisearch engine in laravel scout, Is it possible to get total number of documents (indexes)?

CodePudding user response:

If you want to know how many documents there are on an index, you can get the stats of an index: https://docs.meilisearch.com/reference/api/stats.html#get-stat-of-an-index

If you want to get all the documents of an index, you can use the GET documents route, make sure that the limit parameter is greater than the total number of documents in your index: https://docs.meilisearch.com/reference/api/documents.html#get-documents

  • Related