> ## Documentation Index
> Fetch the complete documentation index at: https://docs.curator.interworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# curator:reindexsearch

> Rebuild the search index

Rebuilds the search index for every searchable model, or for a single model. This is the command-line equivalent of
the `/portal/reindexSearch` API endpoint. Run it after a bulk import or after switching to an external search engine.
It is only needed when Curator uses an external search engine; the built-in database search reads live data and does
not need an index.

**Options:**

| Option         | Required | Description                                                                       |
| -------------- | -------- | --------------------------------------------------------------------------------- |
| `--model`      | No       | Model class to reindex (fully-qualified), or `ALL` for every model. Default `ALL` |
| `--chunk-size` | No       | Records to process per batch, from 1 to 1000. Default `100`                       |

The command exits with a non-zero code if the reindex fails or if any model reports errors, so scripts can detect a
partial reindex.

**Examples:**

```bash theme={null}
# Reindex every searchable model
php artisan curator:reindexsearch

# Reindex a single model
php artisan curator:reindexsearch --model="InterWorks\TableauViz\Models\Dashboard"

# Use a smaller batch size
php artisan curator:reindexsearch --chunk-size=50
```
