This module provides Drush commands to rapidly index with Search API, using all your CPU cores. It can be quite useful when you have more than 10.000 nodes in your website.
It is a multi-process approach by spawning new Drush commands that handle queues.
It relies on Drush and a Unix/Linux-based system.
Controlling search_api_fast examples:
Drupal 8 (settings.php)
$config['search_api_fast.performance']['index_workers'] = 8;
$config['search_api_fast.performance']['worker_batch_size'] = 100;
$config['search_api_fast.performance']['max_batches_worker_respawn'] = 4;
$config['search_api_fast.performance']['drush'] = '/opt/mycooldrush/drush';
Drupal 7 (settings.php)
$conf['search_api_fast_index_workers'] = 8;
$conf['search_api_fast_worker_batch_size'] = 100;
$conf['search_api_fast_max_batches_worker_respawn'] = 4;
Usage
Run this from the webroot to start indexing:
- drush search-api-fast:index [index-name]
You could use 'top' or 'ps -ef | grep drush' to see all workers spawn.
To reindex:
- drush search-api-fast:index [index-name] reindex
To clear the index and then reindex:
- drush search-api-fast:index [index-name] clear
See the README.md for further instructions.
Project information
- Module categories: Performance, Site Search
- Ecosystem: Search API
- 83 sites report using this module
- Created by reinier-V on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 2.x-dev updated 3 Jul 2023 at 12:30 UTC
Development version: 7.x-1.x-dev updated 16 Jun 2020 at 19:35 UTC