Upgrading CKAN's Solr from 8 to 9

Moving CKAN search from Solr 8 to Solr 9 needs a CKAN version that supports it, the matching schema and a full index rebuild. This page covers the sequence, rollback points and what drives effort.

On this page

Why CKAN's Solr upgrade from 8 to 9 is a planned step

If your portal runs Solr 8 and you need Solr 9, the good news is that CKAN 2.10.3 added Solr 9 support, and the move is a schema switch plus a search index rebuild, not a change to how datasets are stored. The outage question is answered mostly by how you sequence the rebuild, so treat the Solr move as a planned change with its own window rather than a side effect of a CKAN upgrade. The CKAN install docs recommend Solr 9 for new installs while still listing Solr 8 as supported, so you are not forced into an immediate jump, but staying on Solr 8 is a choice you should record and revisit.

The supported path depends on the CKAN version you are running or moving to. CKAN's release policy supports the latest patch of the current minor line and the previous minor line, and older patches lose support once a newer one ships. Pick a target CKAN version that is itself on a supported line, then confirm in the CKAN changelog that your target release includes the Solr 9 support you need before you change the schema. If you plan a CKAN minor upgrade at the same time, the Solr change should be tested as a separate step so that a search problem is not mistaken for a platform regression.

Confirm in your own environment which Solr versions your extensions and any hosted search tooling support, because a custom schema or plugin that targets Solr 8 features may need its own check. Ask your team to document the current Solr version, the CKAN version, the schema in use and the expected rebuild duration measured on a copy of production data, since no duration is published here and your dataset count drives it.

What changes when CKAN moves to Solr 9

This table compares each change in the move from Solr 8 to Solr 9 with its effect on a running CKAN portal and the action an operator needs to take. Read it as a checklist: the version support and recommendation rows decide whether the move is supported at all, while the schema and reindex rows decide how much downtime and testing the change needs.

ChangeImpactAction needed
CKAN 2.10.3 adds Solr 9 supportSolr 9 is only supported on CKAN 2.10.3 or later, so earlier 2.10 releases cannot use it.Confirm your CKAN version is 2.10.3 or newer before planning the Solr change.
Solr 9 is the recommended versionThe install-from-source docs recommend Solr 9 and list Solr 8 as an alternative, so new builds should start on Solr 9.Check the current install-from-source page for your CKAN version and record which Solr major version you run.
CKAN schema must match the Solr versionSolr needs the schema file shipped with your CKAN version, so a Solr 9 server with the old Solr 8 schema will not index correctly.Replace the schema in the Solr core with the one from your target CKAN version and confirm its file location in that version's docs.
Solr core configurationCore settings and file paths can differ between CKAN and Solr releases, so an upgrade copied from an older guide may fail at startup.Compare your core configuration with the target version's install docs and test the core in a non-production environment first.
Full reindex after the schema changeExisting index data built under the old schema is not reused, so search results stay incomplete until the index is rebuilt.Plan a full rebuild and use search-index rebuild-fast to shorten it, then verify dataset counts after the run.
Patch releases exclude schema changesA schema switch is outside what a patch release may contain, so it cannot arrive through a routine patch.Schedule the Solr 9 move with a minor or planned CKAN change, and apply patch releases separately.
Search downtime during the switchSearch can return stale or partial results from the moment the schema changes until the rebuild completes.Confirm with your team whether a maintenance window is needed and communicate the search impact to portal users.

What to prepare before touching the search index

Changing the search engine is lower risk than most CKAN changes because the index can be rebuilt from the database. The preparation work is about being able to go back quickly, knowing every component that reads from or writes to the index, and proving the change in a copy of production first.

Back up the PostgreSQL database

The search index is derived data, so the PostgreSQL database is the real restore point. Take a consistent dump immediately before the change and confirm you can restore it into a scratch instance. Include the DataStore database if your portal uses it, since it is a separate PostgreSQL database with its own users. Record the backup time so you know exactly which edits it contains.

Back up configuration and secrets

Copy the ckan.ini file, any environment files, the Solr core configuration you have customized, and the Nginx and uWSGI settings. Store them with the database backup so the restore point includes the settings that tell CKAN where Solr lives. Keep secret values in your secrets store rather than in plain text copies.

Inventory extensions and search customizations

List every installed extension and its version, then note which ones index extra fields, change search queries or ship their own Solr schema changes. Also list custom search templates and any edits to the CKAN schema file. Extensions that depend on Solr behavior are the most likely to need changes, so flag them for compatibility checks before the upgrade window.

Confirm the current Solr version

Check the Solr version you actually run, whether it comes from a container image, a package or a vendor build. Confirm it is Solr 8 and note the exact tag or package version. CKAN 2.10.3 added Solr 9 support, so confirm your CKAN version supports the target before planning the move. The rollback path depends on knowing the starting version exactly.

Build a test environment from production

Create a separate environment from a copy of production data, with the same CKAN version, extensions and Solr image you plan to use. Run the schema switch and a full rebuild there first. Measure how long the rebuild takes and check search results, facets and private dataset visibility. Use the result to set the production maintenance window.

Plan the rollback path

Decide in advance what you will do if search fails after the switch. Keep the old Solr instance or volume untouched until the new index is verified, and keep the CKAN configuration that points at it. Write down who can approve a rollback and what evidence triggers one. A rollback should restore service without requiring a database restore.

How to sequence the Solr 8 to 9 move with rebuild-fast

This sequence moves CKAN search from Solr 8 to Solr 9 while keeping the old index available until the new one has been checked against the database. Each step ends with a check and a rollback point, so the team can stop and return to Solr 8 at any stage before traffic switches.

  1. Confirm the target CKAN version supports Solr 9

    The team lead or platform engineer checks the CKAN version you plan to run against the changelog and install documentation before touching infrastructure. CKAN 2.10.3 added Solr 9 support, so anything earlier in the 2.10 line or older needs a different plan. The output is a written note naming the target CKAN version, the Solr version and the source used. Rollback point: none is needed yet, because nothing has changed.

  2. Back up the database, index and configuration

    The platform team takes a full PostgreSQL backup, copies the current CKAN configuration and the Solr 8 core configuration, and records the running CKAN and extension versions. The database backup is the source of truth for the dataset count later, so it must be restorable and tested before work continues. The output is a backup set with a recorded restore test. Rollback point: if the backup cannot be restored, stop here and fix it before any change.

  3. Stand up Solr 9 beside Solr 8 in test

    The infrastructure team runs a Solr 9 instance in a test environment that mirrors production, leaving Solr 8 in place and untouched. They confirm that Solr starts, that the core or collection is created, and that the network path from the CKAN test web and worker hosts reaches the new endpoint. The output is a Solr 9 node that answers status requests from CKAN hosts. Rollback point: the test instance can be removed without affecting production.

  4. Deploy the matching CKAN schema to Solr 9

    The CKAN developer or operator installs the Solr schema shipped with the target CKAN version into the Solr 9 core, replacing the Solr 8 schema in the test environment only. They point the test CKAN configuration at the Solr 9 endpoint and confirm the schema file matches the CKAN release rather than a copy from an older install. The output is a Solr 9 core with the CKAN schema loaded and CKAN test pointed at it. Rollback point: repointing the test configuration back to Solr 8 restores the previous state.

  5. Restart CKAN and confirm it connects to Solr 9

    The operator restarts the CKAN web processes and background workers in the test environment so they load the new Solr setting. They check the CKAN logs and the site's status page for Solr connection errors and confirm a sample dataset can be created or edited, which writes to the new index. The output is a clean restart with no search connection errors in the logs. Rollback point: revert the Solr URL and restart again if errors persist.

  6. Rebuild the index with rebuild-fast

    The operator runs ckan search-index rebuild-fast in the test environment, which reindexes datasets using multiple processes. They watch the command output for failed datasets and record the total run time so the production window can be planned from a measured figure rather than an estimate. The output is a complete index in Solr 9 with a log of any datasets that failed to index. Rollback point: the rebuild writes only to the Solr 9 core, so Solr 8 remains intact and can still serve traffic.

  7. Verify search and counts against the database

    The QA lead compares the number of indexed datasets in Solr 9 with the count of active datasets in the PostgreSQL database, then runs a set of representative keyword searches, facet filters and organization and tag views on both systems. Any mismatch is traced to failed datasets from the rebuild log before go-live. The output is a signed-off checklist showing matching counts and matching results for the agreed test queries. Rollback point: if counts or facets differ, rebuild again or keep production on Solr 8.

  8. Switch production traffic and keep Solr 8 as rollback

    During the agreed maintenance window, the operator repeats the schema, configuration and rebuild steps against production Solr 9, then repoints CKAN web and worker processes to it and restarts them. The team reruns the search and count checks on production and keeps the Solr 8 node running and unchanged until those checks pass. The output is production serving from Solr 9 with Solr 8 still available. Rollback point: repointing the Solr URL to Solr 8 and restarting returns service to the previous index until the Solr 8 node is decommissioned.

How to verify search and roll back safely

Verify the Solr 9 index before you send users back to it, and keep the Solr 8 path intact until the checks pass. Start with keyword search across a fixed set of queries you chose in advance, including dataset titles, resource names, tags and multilingual terms if your portal uses them. Compare the result lists against the pre-upgrade portal rather than trusting that a non-empty page means a correct one. Check facets next: each organization, group, tag, format and any custom facet from your metadata schema should return counts that match the source data. Confirm that private datasets appear only for users with the right organization roles, by logging in as a sysadmin, an organization editor, a member and an anonymous visitor. Finally, compare dataset counts in the search index against the number of active datasets in PostgreSQL, and investigate any gap before go-live.

Test extension search behavior separately, because extensions that add indexed fields, custom facets or search plugins can fail even when core search works. List every extension that touches search or indexing in your portal, then run its specific queries and confirm the extension's own version supports your CKAN release. Record timings for the reindex in your test environment. The downtime you should expect depends on index size and hardware, so measure a full ckan search-index rebuild-fast run against a copy of production data and do not reuse figures from other portals. For rollback, keep the previous CKAN configuration, including the solr_url setting, and the Solr 8 instance available until the new index is accepted. If the Solr 9 index fails, restore the old configuration and point CKAN back at Solr 8. If that instance is no longer usable, the fallback is to rebuild the index on the restored Solr, which is slower and should be part of your downtime estimate.

What makes a Solr 8 to 9 upgrade take longer

This table lists the factors that most change the effort of moving CKAN search from Solr 8 to Solr 9, with what each one affects and what to check first. Read each row against your own portal inventory, since the biggest driver is usually the volume of datasets and resources that must be reindexed. The main takeaway is that schema, extension and version-gap questions should be answered before any rebuild is scheduled.

DriverEffect on effortWhat to check
Number of datasets and resourcesLonger rebuild time, since the full index is regenerated from the databaseCount datasets, resources and private records; run a timed rebuild-fast in a staging copy
Custom Solr schema changesExtra work to merge local schema fields into the CKAN schema for the target versionDiff your schema.xml against the CKAN schema shipped with your target release
Extensions that index extra fieldsEach extension may need its schema fields and indexing code checked for Solr 9 behaviorList every extension that adds fields to the search index and confirm its supported versions
CKAN version gapA move that also changes minor versions adds code, config and extension upgrade work on top of the Solr changeConfirm your current CKAN version and whether the target release supports Solr 9
Solr hosting modelDocker images tagged per CKAN version reduce setup work; package installs need manual version matchingRecord how Solr is installed today and which Solr image or package matches the target CKAN release
Search availability during rebuildStricter uptime needs push work toward a parallel Solr 9 instance and a cutoverDefine how long search may be degraded and whether users need search during the rebuild
Index maintenance and backupsRebuild scheduling and rollback planning add steps when the old index must stay availableConfirm how you would restore Solr 8 if the Solr 9 index or configuration fails
Staging environment availabilityWithout a copy of production data, rebuild timing and schema issues surface lateConfirm you can run the full upgrade and a rebuild against a recent database copy

Questions buyers ask about the Solr 8 to 9 upgrade

What does a Solr 8 to 9 upgrade cost and what drives the price?

The cost depends on how many CKAN environments need the change, how many extensions touch search or indexing, and how much testing your team requires before cutover. Solr itself is free to download, so the spend is labor: planning the target versions, updating the Solr host or container, switching the CKAN schema, rebuilding the index, and verifying search results in a staging copy of production data. Costs recur only if you keep a support retainer. Ask for a written quote that lists each environment, the Solr hosting change, the test plan and who signs off. DeployOpen does not publish a price list, so a quote follows from that written scope.

How long does the search index rebuild take on a CKAN portal?

The rebuild time depends on dataset count, resource metadata volume, hardware and how many worker processes you allow. CKAN's ckan search-index rebuild-fast command reindexes datasets using multiple processes, so more available CPU and a sensible process count shorten the run. Measure it in staging first: time a rebuild against a copy of production data, then extrapolate to your full catalog. Plan for the portal to serve stale or incomplete search results until the rebuild finishes, and decide with your team whether the new index goes live only after the rebuild completes.

Can our own team upgrade Solr without a partner?

Yes, if you have an engineer who can operate Solr, read CKAN's install and CLI documentation, and test in a non-production environment. The core steps are standard: confirm which CKAN version you run supports Solr 9, deploy Solr 9 with the schema that matches that CKAN release, reindex, and check search behavior. The risk sits in extensions that customize indexing or search, and in production cutover timing. A partner is useful when no one on your team has run this before, when several portals share one search service, or when you need documented evidence for an assessment.

What do we need to provide for the Solr upgrade engagement?

Expect to provide access and a clear decision on scope. Typically that includes:

  • Administrative access to the CKAN hosts, the Solr servers or containers, and the database and configuration files
  • A staging environment that mirrors production versions, extensions and a recent data copy
  • A named owner who signs off the test results and the cutover window
  • Your current CKAN version, installed extensions and their versions, and any custom search or indexing code

Ask the provider to list these inputs in the written scope so the schedule does not depend on discovery work after kickoff.

Can the Solr 8 to 9 upgrade be done in a CKAN patch release?

Not as a patch alone. CKAN patch releases are meant not to break backwards compatibility and exclude schema changes and new features, so a Solr change is handled as a deliberate environment change, not a routine patch install. Confirm the Solr version your CKAN release supports in the CKAN changelog and install documentation, then plan the Solr move as its own change with a rebuild step. Keep your CKAN patch level current either way, because older patch releases lose support once a newer one ships.

What happens if search breaks after cutover?

Plan a rollback before cutover. Keep the Solr 8 service and its index available until the Solr 9 index passes your search tests, so you can point CKAN back to the previous Solr and schema if results are wrong. Run a checklist that covers dataset search, facets, private dataset visibility for each organization role, and API search responses. Record the rollback steps, who can trigger them and how long they take in your environment. Ask any provider to write this rollback plan into the scope and to include a post-cutover check window.

Does the upgrade change who can see private datasets?

It should not change permissions directly, but search is where permission filtering shows up to users, so test it. Index rebuilds and schema changes can expose mistakes in how private and draft datasets are indexed. Include checks for each organization role, anonymous visitors and API tokens in your staging tests, and compare results with the Solr 8 portal before cutover.

How CKAN, Solr and PostgreSQL move during the upgrade

The upgrade starts with a backup of PostgreSQL, the source of truth for datasets and metadata, and a copy of the current Solr 8 configuration. Solr 9 is then stood up beside Solr 8 so the existing index keeps serving searches while the work proceeds. The CKAN schema that matches the target CKAN version is deployed to Solr 9 and CKAN is restarted to point at it. The search index is then rebuilt from PostgreSQL with ckan search-index rebuild-fast, and search results should be checked against known datasets before cutover. If verification fails, CKAN is pointed back at Solr 8.

Upgrade phases, with PostgreSQL feeding the rebuilt search index.

Where to confirm the Solr 9 support details

Confirm Solr 9 support in the CKAN release you actually run before you change anything. The CKAN changelog is the first place to check: the entry for CKAN 2.10.3 records the addition of Solr 9 support, and the entries for later releases show any changes to search indexing or schema handling. Read the changelog for your exact target version rather than relying on a general summary, since the supported Solr range is tied to the CKAN release. The CKAN changelog is the natural starting point for that check.

Next, confirm the procedure against the CKAN command line interface documentation, which describes the ckan search-index rebuild-fast command and its use of multiple processes. Check the command's options and output in the version you run, because the flags and behavior can change between releases. The install-from-source documentation also lists Solr 9 as the recommended version alongside Solr 8 as a supported option, so use it to confirm the Solr version you plan to deploy. Record the exact Solr and CKAN versions in your change plan.

Also confirm the schema file names and the schema path for your release. The Solr schema shipped with CKAN is matched to a CKAN version, so take the schema from the same release tag you deploy and verify its file name in that source tree, not in a copy from an older install. Ask your CKAN extension vendors and your Solr image maintainer to confirm they support the same Solr major version. If a check fails or a detail is missing from the docs, treat the gap as a blocker for the cutover and resolve it in a staging environment first.

How DeployOpen scopes and delivers a CKAN search upgrade

DeployOpen plans the move from Solr 8 to Solr 9 as a written, fixed-scope piece of work on your CKAN portal, inside infrastructure you control. The work covers the version check, the matching CKAN schema, a staged rebuild of the search index and a handover your team can run again later.

How we scope

  • Confirm your current CKAN version and whether it supports Solr 9 before any change is planned
  • Inventory the Solr 8 setup, custom schema edits and any extensions that depend on search behavior
  • Agree in writing the environments, the cutover window and the index rebuild approach before work starts

How we build

  • Stage the Solr 9 instance and the matching CKAN schema in a non-production environment first
  • Run ckan search-index rebuild-fast in the test environment and record timing and any indexing errors
  • Test dataset search, faceting, organization filters and private dataset visibility against the new index

How we hand over

  • Document the Solr version, schema file, CKAN configuration and the exact rebuild steps used
  • Provide a cutover runbook with a rollback path to the Solr 8 index if verification fails
  • Walk your platform and CKAN administrators through the rebuild and post-upgrade checks

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the handover
  • Plan follow-on work for later CKAN patch releases so the search stack stays on a supported path
  • Confirm support terms and response expectations in the written scope rather than assuming them

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.