drush osri - Queue a Full Solr Reindex for a Server

opensolr:reindex, everything back in the queue

drush osri

drush osri (full name opensolr:reindex) puts every item back in the queue, for every enabled index of a server or for one index. It deletes nothing from Solr: search keeps answering with the current documents while drush ost replaces them.

drush osri [--server=ID] [--index=ID]

Options

--server

Queue the indexes of this server. Default: the first enabled Solr server.

--index

Queue only this index. Default: every enabled index of the server.

What you see

Queuing all items for reindexing on server: my_solr_server

  Queuing content_index... OK (299,123 items queued)

Total: 299,123 items queued for indexing.
Run drush ost --server=my_solr_server to start indexing.

It only queues. Indexing starts when you run drush ost.

osri or osrb?

  • drush osri queues the items the tracker already knows. Fast; use it for a routine full reindex.
  • drush osrb rebuilds that list from your content first. Use it when the counts look wrong.

For one index, drush osri does the same as Search API's own drush search-api:reset-tracker (alias sapi-r); osri does every index of a server in one go. The whole procedure: Reindex a whole site.

Commands