PHPackages                             wazum/solr-eager-flush - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. wazum/solr-eager-flush

ActiveTypo3-cms-extension[Queues &amp; Workers](/categories/queues)

wazum/solr-eager-flush
======================

Eager Solr indexing on save for TYPO3 (ext:solr)

1.3.0(1mo ago)0174GPL-2.0-or-laterPHPPHP ^8.2CI passing

Since Jun 3Pushed 1w agoCompare

[ Source](https://github.com/wazum/solr-eager-flush)[ Packagist](https://packagist.org/packages/wazum/solr-eager-flush)[ RSS](/packages/wazum-solr-eager-flush/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (18)Versions (5)Used By (0)

 [![Solr Eager Flush](Resources/Public/Icons/Extension.svg)](Resources/Public/Icons/Extension.svg)

Solr Eager Flush for TYPO3
==========================

[](#solr-eager-flush-for-typo3)

[![Tests](https://github.com/wazum/solr-eager-flush/actions/workflows/tests.yml/badge.svg)](https://github.com/wazum/solr-eager-flush/actions/workflows/tests.yml)[![Packagist Version](https://camo.githubusercontent.com/e8e79f8795900dfe4fade222e8313f8621fe961aff4d182380100bebde9c7ae7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77617a756d2f736f6c722d65616765722d666c7573682e737667)](https://packagist.org/packages/wazum/solr-eager-flush)[![Supported TYPO3](https://camo.githubusercontent.com/b53bdca9ce384fc877701998f476e5f2dbf33c5e3563e6f8bd197b46a3160f35/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31332e3425323025374325323031342e332d6f72616e67652e737667)](https://get.typo3.org/)[![Supported PHP](https://camo.githubusercontent.com/a8b5158830418a4f03a426749c19915d4904d8d367e2677d991d9f67eb639ea2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e32253230253743253230382e33253230253743253230382e34253230253743253230382e352d626c75652e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/fc7ef0bd4e7daa962ca0072e865f9970ee5441edb26f5fca76d6e7f0d3805a70/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d322e302d626c75652e737667)](LICENSE)

Push editorial changes into Solr **the moment a record is saved**, instead of waiting for the next index-queue scheduler run.

With `apache-solr-for-typo3/solr` in its default [`monitoringType = 0` (Immediate)](https://docs.typo3.org/p/apache-solr-for-typo3/solr/main/en-us/Configuration/Reference/ExtensionSettings.html) mode, saving a record only *enqueues* it in `tx_solr_indexqueue_item`; the document reaches Solr later, when the [**Index Queue Worker**](https://docs.typo3.org/p/apache-solr-for-typo3/solr/main/en-us/Backend/IndexQueue.html) scheduler task next runs. This extension closes that gap: it indexes the freshly queued items at the end of the save request — on PHP-FPM *after* the response has been sent to the editor, so the save itself stays fast. Built-in gates back off under queue pressure or while the scheduler is already working, so the eager flush stays out of the way when it would cost too much.

See [CHANGELOG.md](CHANGELOG.md) for release notes.

Requirements
------------

[](#requirements)

- TYPO3 13.4 LTS or 14.3+
- `apache-solr-for-typo3/solr` ^13.0 || ^14.0 in `monitoringType = 0` (the default)
- PHP 8.2, 8.3, 8.4 or 8.5

Note

On TYPO3 14, `apache-solr-for-typo3/solr` is currently available only as a pre-release (`^14.0@beta`). Allow beta stability in your project ([`composer config minimum-stability beta && composer config prefer-stable true`](https://getcomposer.org/doc/04-schema.md#minimum-stability)) before requiring this extension there.

Installation
------------

[](#installation)

```
composer require wazum/solr-eager-flush
```

How it works
------------

[](#how-it-works)

After a record is saved, ext:solr updates its index queue and fires a [`ProcessingFinishedEvent`](https://docs.typo3.org/p/apache-solr-for-typo3/solr/main/en-us/Development/Events.html). This extension listens for that event, resolves the saved record's site, and schedules an index flush for the end of the request. Several saves in one request collapse into a single flush per affected site.

### When the flush runs

[](#when-the-flush-runs)

The flush runs at the end of the same, already-booted request — but whether the editor waits for it depends on the server API:

- **PHP-FPM** — the response is released to the editor first ([`fastcgi_finish_request()`](https://www.php.net/manual/en/function.fastcgi-finish-request.php)), so the save returns immediately and indexing happens afterwards, with no waiting. This is the case the extension is built for, and what most TYPO3 setups run (nginx or Apache in front of PHP-FPM).
- **Other per-request SAPIs** (Apache `mod_php`, CGI) — the flush still runs at the end of the request, but the connection can't be released early, so the editor waits for it much as they would for inline indexing.

Note

Even when the response is released early, the PHP process stays busy until the flush finishes — it counts against your FPM worker pool ([`pm.max_children`](https://www.php.net/manual/en/install.fpm.configuration.php)). The gates and `deltaMax` keep each flush bounded.

Warning

Persistent worker runtimes ([FrankenPHP worker mode](https://frankenphp.dev/docs/worker/)) are not supported for the eager flush: their process is reused across requests, so the end-of-request hook would not fire per save. Leave such a site on queue-based indexing — opt it out with the per-site key below.

### When the flush backs off

[](#when-the-flush-backs-off)

Before indexing, two gates can tell the flush to stand down and leave the work to the scheduler:

- **Pressure gate** — skips when more than `indexQueueLimit` items are already pending, leaving bulk changes to the scheduler.
- **Scheduler-activity gate** — skips while an Index Queue Worker task is running, to avoid competing with it.

### What gets indexed

[](#what-gets-indexed)

The flush is scoped to the roots responsible for the saved record — usually one, but a record shared across sites (for example through ext:solr's `additionalPageIds`) flushes every root it belongs to, exactly as the index queue records them. A root is skipped when:

- it can't be resolved (the items are left to the scheduler),
- eager flush is disabled for it, or
- its Solr doesn't answer a quick ping.

Otherwise each root's queued items are indexed right away, up to `deltaMax` and limited to the configured `typeFilter`. Any failure is logged and never breaks the save.

Tip

Configure a short Solr connection timeout. A Solr that *refuses* the connection fails instantly, but an *unreachable* host could otherwise stall the ping.

Configuration
-------------

[](#configuration)

Configure via the TYPO3 backend under **Settings → Extension Configuration → solr\_eager\_flush**:

SettingDefaultDescription`typeFilter``records`Which item types to eager-flush: `records`, `pages`, or `both`. Defaults to `records` because ext:solr indexes a page by rendering it, which is comparatively heavy. With the response released early the editor no longer waits for it, but the PHP process does — set `pages` or `both` to opt in.`indexQueueLimit``5`Skip the eager flush when more than this many pending index-queue items already exist. Clamped to `100`.`deltaMax``10`Maximum index-queue items to index per invocation, per affected site root. Clamped to `100` to keep a single request's synchronous flush bounded.Note

`deltaMax` is automatically raised to at least `indexQueueLimit`. Otherwise the `deltaMax`-sized indexing window could be filled by items the `typeFilter` then discards, leaving allowed items unflushed until the next scheduler run.

Note

Editing a content element (`tt_content`) enqueues its **containing page**, not a `tt_content` item. In the default `records` mode those page items are excluded, so ordinary content edits are not eager-flushed — set `typeFilter` to `pages` or `both` if you want content edits to reach Solr immediately.

Note

"Immediate" means the document reaches Solr at the end of the save request. Whether it becomes *searchable* right away still depends on your ext:solr/Solr commit configuration (hard commit vs. auto/soft commit). With commits disabled the document is indexed but stays invisible until Solr next commits; hard-committing on every editorial save, on the other hand, is expensive.

### Per-site control

[](#per-site-control)

Eager flush is enabled for every site by default. To run it only on some sites — for example, immediate indexing on a public website but queue-based indexing on an intranet — opt a site out in its site configuration (`config/sites//config.yaml`):

```
solr_eager_flush_enabled: false
```

Sites without the key keep eager flush enabled. This also serves as a per-site kill switch in production without uninstalling the extension.

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

4

Last Release

39d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4ea950f22b43e010ba4f0a6effb0928a6a1d11f64d36cec0d030b757bdfa85e?d=identicon)[wazum](/maintainers/wazum)

---

Top Contributors

[![wazum](https://avatars.githubusercontent.com/u/146727?v=4)](https://github.com/wazum "wazum (45 commits)")

---

Tags

apache-solrext-solrindex-queueindexingsearchsolrtypo3typo3-cmstypo3-extensionqueuesolrtypo3indexingext-solr

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wazum-solr-eager-flush/health.svg)

```
[![Health](https://phpackages.com/badges/wazum-solr-eager-flush/health.svg)](https://phpackages.com/packages/wazum-solr-eager-flush)
```

###  Alternatives

[aimeos/aimeos-typo3

Professional, full-featured and high performance TYPO3 e-commerce extension for online shops and complex B2B projects

1.6k94.1k6](/packages/aimeos-aimeos-typo3)[apache-solr-for-typo3/solr

Apache Solr for TYPO3 - Apache Solr for TYPO3 is the enterprise search server you were looking for with special features such as Faceted Search or Synonym Support and incredibly fast response times of results within milliseconds.

1493.2M49](/packages/apache-solr-for-typo3-solr)[hmmh/solr-file-indexer

Solr file indexer for Typo3

15239.8k3](/packages/hmmh-solr-file-indexer)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k57](/packages/friendsoftypo3-content-blocks)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
