You can regenerate the index database for a specific data store or for all data stores on the server using the dsidxgen command. Although the index files are automatically updated, regenerating the index database is a useful operation because it frees up disk space. Regenerating indexes helps improve performance on search operations.
For details, see the dsidxgen(1m) man page.