Although the Smart Search index is automatically kept up-to-date whenever content items are amended, there are some circumstances where you need to re-run the indexer. You can do this manually using the Index toolbar button in the Manage Indexed Content screen, however if you need to re-index content automatically then it is also possible to run the indexer as a command-line application. This makes it particularly convenient to run the indexer from a cron job.
Simply enter this command to run the indexer:
Typical output from the command-line indexer looks like this:
Smart Search INDEXER
Setting up Finder plugins
Setup 154 items in 0.094 seconds.
* Processed batch 1 in 0.213 seconds.
* Processed batch 2 in 0.182 seconds.
* Processed batch 3 in 0.177 seconds.
* Processed batch 4 in 0.009 seconds.
Total Processing Time: 0.676 seconds.
Purging before indexing
php finder_indexer.php --purge
Note that this will attempt to preserve any static filters you may have set up, whereas clicking on the "Purge" toolbar button in the Administrator will not preserve your static filters.
Setting up a cron job
Out of memory issues
php -d memory_limit=256M finder_indexer.php
Replace the 256M with whatever is appropriate for your circumstances.