Artisan CLI Tools
ElasticLens provides a set of Artisan commands to manage and monitor your indexes.
1. Status Command
Section titled “1. Status Command”Overall Indexes Status
php artisan lens:statusDisplays the overall status of all your indexes and the ElasticLens configuration.

2. Health Command
Section titled “2. Health Command”Index Health
php artisan lens:health User
Provides a comprehensive state of a specific index, in this case, for the User model.
3. Migrate Command
Section titled “3. Migrate Command”Migrate and Build/Rebuild an Index
php artisan lens:migrate UserDeletes the existing User index, runs the migration, and rebuilds all records.

4. Make Command
Section titled “4. Make Command”Create a new Index Model
php artisan lens:make ProfileGenerates a new index for the Profile model.

5. Build Command
Section titled “5. Build Command”Bulk (re)build indexes:
php artisan lens:build ProfileRebuilds all the IndexedProfile records for the Profile model.
