Reindex a Whole Drupal Site into Solr, Step by Step
osri, ost, oss, and which reset to use
Reindex a whole site
Use this when every document of a server must be built again. Search keeps working the whole time: the old documents stay until the new ones replace them.
-
See where you start:
drush oss --server=my_solr_server -
Put every item back in the queue. Nothing is deleted from Solr:
drush osri --server=my_solr_server -
Start indexing in the background:
drush ost --server=my_solr_server -
Follow it, with the summary or with the log:
drush oss tail -f /tmp/opensolr_turbo_my_solr_server.log - It is done when
drush ossshows 100.0% and remaining 0 for every index, and the log ends withINDEXING COMPLETE.
Just one index
drush osri --index=content_index
drush ost --index=content_index
Which reset to use
Queues every item the tracker knows. Search keeps the old documents until they are replaced.
Search API's own command for this: search-api:reset-tracker (sapi-r).
Rebuilds the tracker from your content, then every item waits. For wrong counts or missing items. Search keeps the old documents until they are replaced.
Search API's own command for this: search-api:rebuild-tracker (sapi-rt).
Deletes every document of the index from Solr and queues every item. Search finds nothing until indexing brings the documents back.
Alias: sapi-c.
The osri and osrb commands work on every enabled index of a server at once; the Search API commands take one index ID, or every index when you leave it out.
Everyday tasks
- Reindex a whole site
- Background mode
- Stop and resume
- Several servers and indexes