Summary

This is the tracking (meta) issue for Search API Fast 3.x, a
complete rewrite of the module on a modern, layered architecture targeting
Drupal 11 and PHP 8.3+. The proven 2.x
design — sharding the items of an index across many parallel Drush workers
backed by database queues — is preserved, but every part is re-implemented
with dependency injection, value objects, strict types and full test
coverage, and the feature set is extended with a UI dashboard and better CLI
feedback.

Work happens on the 3.0.x branch. Per-topic child issues (below)
let the community and maintainers test and give feedback on one area at a
time.

Why a 3.x rewrite?

  • Security & robustness. 2.x spawned and managed workers
    with raw shell strings (exec(), nohup,
    ps, pkill), which is fragile and a command-
    injection surface. 3.x uses the Symfony Process component with argument
    arrays (no shell) and tracks processes by PID.
  • Portability. 2.x effectively required Search API Solr and
    a specific environment. 3.x works with any Search API backend and targets
    current Drupal/PHP.
  • Maintainability. A few large classes became a layered,
    dependency-injected design with unit, kernel and functional tests and CI
    quality gates.
  • User experience. A working UI dashboard, and a Drush
    command that runs in the background by default with an opt-in, TTY-aware
    live progress bar (--progress), which also addresses reviewer
    feedback on the 2.x progress work.

What's different from 2.x

Aspect 2.x 3.x
Drupal / PHP 9.5–11 / older PHP 11 only / 8.3+
Worker spawning exec/nohup shell strings Symfony Process, proc_open argument arrays
Process tracking / kill ps … | grep, pkill -f PID tracking via ext-posix (/proc fallback)
Search backend Solr-oriented Any Search API backend
Drush command One index; returns immediately, no output All indexes in order, background by default; --progress for a live bar; stop command; aliases kept
UI Incomplete dashboard Working dashboard: start / reindex / clear / stop, live progress & host stats
Stop Unreliable Cooperative stop flag (respawn-safe)
Architecture A few large classes Layered, DI, final readonly value objects, strict_types
Drush path detection Duplicated in 3 places Single resolver service
Tests / CI None Unit + Kernel + Functional; GitLab CI (phpcs, phpstan, phpunit, eslint, stylelint, cspell)

Roadmap

Done (on 3.0.x, CI green)

  • Layered architecture, D11 / PHP 8.3, Symfony Process worker engine.
  • Drush search-api-fast:index: background by default, --progress for a live bar, --exclude, and a search-api-fast:stop command.
  • Fast indexing UI dashboard (per-index tab + status-form embed).
  • Reliable stop and respawn-safe progress tracking.
  • Settings form and configuration (incl. settings.php override).
  • Unit / Kernel / Functional tests and CI quality gates.
  • README, CHANGELOG and UPGRADING documentation.

In progress / needs community testing

  • Broader real-world testing across backends, hosting and index sizes.
  • Per-topic feedback via the child issues below.

Child issues

  • Fast indexing from the UI (dashboard) — #3592781
  • Drush indexing with visual progress feedback — #3592783
  • Test coverage and CI quality gates — #3592785
  • Documentation (README, CHANGELOG, UPGRADING) — #3592787
  • Exclude specific indexes when running over all indexes — #3592802
  • Foundation: layered architecture (Drupal 11 / PHP 8.3) — #3592803
  • Harden worker process spawning and termination (security) — #3592804
  • Reliable stop and accurate progress tracking (respawn-safe) — #3592805
  • Upgrade path and backwards compatibility (2.x → 3.x) — #3592806

How to test

composer require drupal/search_api_fast:3.0.x-dev
drush en search_api_fast
# CLI (background by default; --progress to watch, sapi-fast-stop to stop):
drush sapi-fast
drush sapi-fast my_index reindex --progress
drush sapi-fast-stop
# UI: /admin/config/search/search-api/index/MY_INDEX/fast
# Settings: /admin/config/search/search-api-fast

Requirements: Drupal 11, PHP 8.3+, Drush, and the PHP proc_open()
function enabled (the ext-posix extension and the setsid
command are recommended; the status report shows what is available).

Comments

johan den hollander created an issue. See original summary.

johan den hollander’s picture

Title: [meta] Search API Fast 3.x: a modern rewrite for Drupal 11 / PHP 8.3 » [meta] Search API Fast 3.x: a modern rewrite
johan den hollander’s picture

Issue summary: View changes
johan den hollander’s picture

Issue summary: View changes
johan den hollander’s picture

Assigned: Unassigned » batigolix
johan den hollander’s picture

Issue summary: View changes
johan den hollander’s picture

Issue summary: View changes
johan den hollander’s picture

Issue summary: View changes
johan den hollander’s picture

Issue summary: View changes