Problem/Motivation

The "Re-index Content" button on the settings page currently processes all configured nodes in a single request. On sites with hundreds or thousands of nodes, this can cause PHP timeouts or memory limit errors.
For example, a site with 5,000 articles with body and summary fields could easily exceed the default 30-second PHP timeout during a full re-index.

Proposed resolution

Replace the synchronous re-index with Drupal's Batch API:
Clicking "Re-index Content" starts a batch operation with a progress bar
Nodes are processed in configurable chunks (e.g., 50 per batch)
The admin sees real-time progress ("Processing 150 of 5,000...")
Batch can be safely interrupted and resumed
Alternatively, use the Queue API with cron for background processing, though the Batch API provides better UX since the admin gets immediate feedback.
Note: This only affects the full re-index operation. The automatic per-node indexing on content save (via entity hooks) is already efficient and does not need batching.

User interface changes

The "Re-index Content" button will show a progress bar instead of a loading spinner

Issue fork 3569915-3573390

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • main Comparechanges, plain diff MR !3

Comments

solimanharkas created an issue. See original summary.

solimanharkas’s picture

Assigned: solimanharkas » Unassigned
Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.