Skip to content

Add the solr preset - #27

Merged
geodro merged 12 commits into
mainfrom
feat/solr-preset
Sep 20, 2026
Merged

geodro merged 12 commits into
mainfrom
feat/solr-preset

Conversation

@geodro

@geodro geodro commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Drupal and TYPO3 both expect Solr, and the store offered them only Elasticsearch and OpenSearch, which is not what those communities reach for.

I wired a real Drupal 11 site to it rather than reading documentation at it, and that found two things the preset had to get right.

The image loads no optional modules by default, and Drupal's Search API Solr config set declares solr.ICUCollationField. Without analysis-extras the core refuses to load with "Unable to create core", and the integration stops before it starts. The preset turns that module on.

Each site gets its own core, named after it, the way it already gets its own database and its own bucket. A shared core would put every site's documents in one index, so one site's search would answer with another's content and clearing one would empty them all. Checked with two sites side by side: each saw only its own document. The core is created when a site is linked, and creating one that already exists is not an error here.

The end to end run is worth recording. The site's existing search view, which ran on the database backend, was pointed at this server, reindexed, and searching the site returned the right content, with stemming so a plural finds the singular. One caveat that belongs to the application rather than to this preset: an index configured for the database backend carries Drupal's own ignorecase, tokenizer and stemmer processors, and leaving them on with Solr processes the text twice, which made uppercase keywords stop matching until they were removed.

Something the preset cannot do, and should not pretend to: Drupal keeps its Solr connection in config entities rather than in env, so the SOLR_HOST, SOLR_PORT and SOLR_CORE keys do not reach it. lerd already says as much when linking. The connection is overridden per environment from settings.php instead, and the path there contains the site's own server machine name, which no preset can guess.

The dashboard is included and working: the overlay embeds the UI through the proxy's prefix-stripping mode, which also drops the framing header it answers with. That mode is in lerd-env/lerd#1841, so this preset needs the release that carries it. Merging it before then would put an empty box in front of everyone who has not upgraded, because an older lerd ignores dashboard_proxy_strip and frames the port directly. Hold this until that ships.

The mark is the symbol from the official logo reduced to paths, and the colour is the brand red.

@geodro
geodro requested a review from a team as a code owner September 17, 2026 13:11
Drupal and TYPO3 both expect Solr, and the store offered them only Elasticsearch and OpenSearch, which is not what those communities reach for.

Two things this had to get right, both found by wiring a real Drupal 11 site to it rather than by reading documentation.

The image loads no optional modules by default, and Drupal's Search API Solr config set declares solr.ICUCollationField. Without analysis-extras a core built from that config set refuses to load with "Unable to create core", and the integration stops before it starts, so the preset turns that module on.

Each site gets its own core, named after it, the way it already gets its own database and its own bucket. A single shared core would put every site's documents in one index, so one site's search would answer with another's content and clearing one would empty them all. The core is created when a site is linked, and creating one that already exists is not an error here.

No dashboard yet. Solr serves its UI only under /solr and has no setting for a mount path, so embedding it needs the proxy's prefix-stripping mode, and a lerd without that would frame the port directly and get an empty box.

The solr CLI is shimmed onto the host for indexing and core management. bin/post deliberately is not: 9.10 deprecates it in favour of "solr post", which the shim already covers.
The image is a major line upstream keeps moving, the same shape as gotenberg:8, which the store already treats as rolling. minor was copied from the presets that pin an exact version, where it belongs.
The store now renders one published tree per schema, so the preset moves to sources/ and the trees are regenerated from it. Rendered to schema 1 it carries no dashboard, since the solr UI refuses framing and schema 1 has no proxy to strip that, and rendered to schema 2 it carries the dashboard and the strip flag.
The preset carries a dashboard that only works behind the schema 2 proxy, so it is authored there and rendered down: schema 1 publishes it without a dashboard rather than with one that cannot be framed.
@geodro
geodro merged commit 8bb18fe into main Sep 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant