Stats

Stats gives extended information and metrics about indexes and the MeiliSearch database.

Get stat of an index

GET

  1. /indexes/:index_uid/stats

Get stats of an index.

Path variables

VariableDescription
index_uidThe index UID

Example

cURL

JavaScript

Python

PHP

Ruby

Go

Rust

  1. curl \
  2. -X GET 'http://localhost:7700/indexes/movies/stats'
  1. client.index('movies').getStats()
  1. client.index('movies').get_stats()
  1. $client->index('movies')->stats();
  1. client.index('movies').stats
  1. client.Index("movies").GetStats()
  1. let stats: IndexStats = movies.get_stats().await.unwrap();

Response: 200 Ok

  1. {
  2. "numberOfDocuments": 19654,
  3. "isIndexing": false,
  4. "fieldDistribution": {
  5. "poster": 19654,
  6. "release_date": 19654,
  7. "title": 19654,
  8. "id": 19654,
  9. "overview": 19654
  10. }
  11. }

Get stats of all indexes

GET

  1. /stats

Get stats of all indexes.

Example

cURL

JavaScript

Python

PHP

Ruby

Go

Rust

  1. curl \
  2. -X GET 'http://localhost:7700/stats'
  1. client.stats()
  1. client.get_all_stats()
  1. $client->stats();
  1. client.stats
  1. client.GetAllStats()
  1. let stats: ClientStats = client.get_stats().await.unwrap();

Response: 200 Ok

  1. {
  2. "databaseSize": 447819776,
  3. "lastUpdate": "2019-11-15T11:15:22.092896Z",
  4. "indexes": {
  5. "movies": {
  6. "numberOfDocuments": 19654,
  7. "isIndexing": false,
  8. "fieldDistribution": {
  9. "poster": 19654,
  10. "overview": 19654,
  11. "title": 19654,
  12. "id": 19654,
  13. "release_date": 19654
  14. }
  15. },
  16. "rangemovies": {
  17. "numberOfDocuments": 19654,
  18. "isIndexing": false,
  19. "fieldDistribution": {
  20. "overview": 19654,
  21. "id": 19654,
  22. "title": 19654
  23. }
  24. }
  25. }
  26. }