Index Several Search API Solr Servers and Indexes at Once
One session per server or per index
Several servers and indexes
Every drush ost run is a session. A session is named after its server, or after
its server and index when you pass --index. Each session has its own log, process ID, state and
chunk files, so several sessions can run side by side.
Several servers
List your servers, then name the one you want every time. Left out, --server means the first enabled Solr server, which may not be the one you meant.
drush search-api:server-list
drush ost --server=production_solr --workers=8
drush ost --server=staging_solr --workers=4
drush oss
drush osstop --server=staging_solr
Several indexes of one server
Without --index, a session does the server's indexes one after another. To run two at the same time, start one session per index:
drush ost --index=content_index --workers=6
drush ost --index=taxonomy_index --workers=2
Share the machine
Workers of all sessions run on the same machine and talk to the same database. Keep the total (8 + 4 in the first example) within what the machine can carry: Workers and batch size.
drush oss shows every running session. drush osstop --server=... stops one;
read what it does to the others on drush osstop.
Everyday tasks
- Reindex a whole site
- Background mode
- Stop and resume
- Several servers and indexes