Drush Commands for Parallel Solr Indexing

Complete command reference with examples

Commands

opensolr:turbo ost

Start the turbo indexer with parallel workers. This is the main command for fast indexing.

Option Default Description
--server auto Search API server ID (auto-detects first Solr server)
--index all Specific index ID, or all indexes on the server
--workers 10 Number of parallel workers
--batch 200 Items per batch per worker
--background true Run as background daemon (default, survives SSH disconnect)
--no-background Run in foreground instead

Examples

# Basic usage - runs in background with 10 workers
drush ost

# Index a specific server
drush ost --server=my_solr_server

# Index specific index only
drush ost --index=my_solr_index --workers=4

# Run multiple servers in parallel (each gets its own session)
drush ost --server=production_solr
drush ost --server=staging_solr

# Run in foreground (interactive mode)
drush ost --no-background
opensolr:stats oss

Display indexing statistics and status of any running background process.

Option Default Description
--server auto Search API server ID
--index all Specific index ID
# Check status of all indexes
drush oss

# Check specific index
drush oss --index=my_solr_index
opensolr:stop osstop

Stop running workers and background processes. Stops all sessions by default, or a specific server/index session.

Option Default Description
--server all Stop only this server's indexer
--index all Stop only this specific index session

Examples

# Stop all running indexers
drush osstop

# Stop only the staging server indexer
drush osstop --server=staging_solr

# Stop a specific index session
drush osstop --index=my_solr_index
opensolr:reindex osri

Queue all items for reindexing on a server. Marks all tracked items as "needs indexing" for all enabled indexes on the server, without rebuilding the tracker. This is the recommended way to trigger a full reindex.

Option Default Description
--server auto Search API server ID (auto-detects first Solr server)
--index all Specific index ID, or all indexes on the server

Examples

# Queue all items on a specific server
drush osri --server=my_solr_server

# Queue a specific index only
drush osri --index=my_solr_index

# Queue all indexes on default server
drush osri
opensolr:rebuild osrb

Rebuild trackers for all indexes on a server. This re-scans all content and marks items for indexing. Use this only when the tracker is out of sync. For routine reindexing, use osri instead.

Option Default Description
--server auto Search API server ID (auto-detects first Solr server)
--index all Specific index ID, or all indexes on the server

Examples

# Rebuild all indexes on a specific server
drush osrb --server=my_solr_server

# Rebuild a specific index only
drush osrb --index=my_solr_index

# Rebuild all indexes on default server
drush osrb