Guides and Tutorials
Opensearch Migration Guide
This guide is for self-hosted installations — installations where you run your own search cluster. If dotCMS Cloud hosts your search infrastructure, the migration is handled for you and this guide does not apply.
This page is the procedure. The explanation behind it — the four positions, the readiness report, TLS, the service account, templates, plugins, indexes, Site Search, startup validation and the full command reference — lives in the OpenSearch Migration Reference. Every step links to the section that explains it, so you can follow the procedure start to finish without reading the reference first, and reach for it when you want to know why.
Who This Is For#
You administer a self-hosted dotCMS installation and you are moving its search layer from Elasticsearch to OpenSearch. You will stand up a second search cluster, have dotCMS write to both for a while, move reads across once you have confirmed the two agree, and then retire the old one.
You control the pace with a single setting. Nothing your visitors see changes until you decide it does, and every step before the last one is reversible.
Budget a few hours of attention spread over a few days — most of the elapsed time is waiting for indexes to fill and watching for problems, not typing.
What the Migration Is#
dotCMS moves through four positions. You set the position, restart, confirm it took, and let things settle before moving on.
| Position | What it does |
|---|---|
| 0 | Elasticsearch only. Where you are now. |
| 1 | dotCMS writes to both engines. Reads still come from Elasticsearch. |
| 2 | dotCMS still writes to both. Reads now come from OpenSearch. |
| 3 | OpenSearch only. Elasticsearch is no longer written to or read from. |
Positions 1 and 2 are the working part of the migration. Position 1 gets a full copy of your content into OpenSearch and keeps it current. Position 2 is where you find out whether OpenSearch actually serves your site correctly, with Elasticsearch still sitting there intact if it does not.
Full detail on each position, including what changes about failure behaviour, is in The Four Positions.
The Three Rules#
Read these before you start. Each one is here because ignoring it produces a migration that looks fine and is not.
Rule 1 — Only changes made after you switch on dual-write get mirrored. Turning on position 1 does not copy your existing content to the new engine. It copies everything that changes from that moment on. The existing content gets there by a full reindex, which you run deliberately in Step 3. Skip it and OpenSearch holds only whatever happened to be edited since.
Rule 2 — Restart after every position change, and confirm the position took. The setting is read at startup. Changing it without a restart changes nothing. And a restart is not proof the change applied: if dotCMS cannot validate the new engine when it comes up, it can quietly return to position 0 and carry on serving from Elasticsearch. One command confirms it. Run it every time. See Startup Validation.
Rule 3 — The readiness report is the instrument. dotCMS ships an endpoint that compares the two engines and tells you whether it is safe to advance. Use it rather than inferring health from the fact that your site looks normal — your site will look normal in several states that are not safe. What the report can and cannot see is in The Readiness Report.
Set Up Your Levers#
Fill these in once, in the shell you will work from. Every command in this guide is then literal and paste-able, with nothing left to substitute.
export DOT=https://your-dotcms.example.com
export DOT_AUTH=admin@example.com:yourpassword
export OS_URL=https://your-new-opensearch-host:9200
export OS_AUTH=your-service-account:itspassword
export SRC_URL=https://your-current-engine:9200
export SRC_AUTH=current-user:itspasswordThis matters more than it looks. The most expensive mistake available in this procedure is running a command against the engine you did not mean, getting a plausible answer, and believing it. Naming the two engines separately and never typing a host again removes that possibility.
Check they are set before you start:
echo "$DOT" && echo "$OS_URL" && echo "$SRC_URL"Command Index#
Six shapes. Everything in this guide is one of them.
| Purpose | Shape |
|---|---|
| Ask an engine its version | curl -sk -u "$OS_AUTH" "$OS_URL/" | jq .version.number |
| List an engine's indexes | curl -sk -u "$OS_AUTH" "$OS_URL/_cat/indices?v" |
| Read the readiness report | curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jq |
| Change the position | Set DOT_FEATURE_FLAG_OPEN_SEARCH_PHASE, restart dotCMS |
| Control a reindex | POST / GET / DELETE on $DOT/api/v1/esindex/reindex |
| Find affected code | grep over templates; unzip + grep over plugin jars |
Substitute $SRC_AUTH and $SRC_URL in the first two to ask the same questions of your current engine. You will do that often — most checks in this guide are the same question asked of both.
Full syntax for all of them is in Command Reference.
Choose Your Path#
If your site is small and simple — a few thousand pieces of content, no custom plugins, no templates calling search directly — you can run Steps 1 through 5 in a single sitting. Step 1 will come back empty, the reindex in Step 3 will finish in minutes, and the waiting periods can be short.
Otherwise, take the staged walk. Spread the positions across days. Sit at position 1 long enough for a normal content-editing cycle to happen, and at position 2 long enough for real traffic to exercise your search-driven pages. The migration is reversible right up until Step 5, and the value of that reversibility is entirely in having used the time.
Decide now, because it changes how long you sit between steps and nothing else.
Five steps. Each sub-step reads the same way: what to run, what a correct result looks like, what to do if you get something else. Explanation of why lives in the reference and is linked, not inlined — so that following the procedure and understanding the procedure are two separate activities you can do at two separate times.
Step 1: Find Breaking Code#
Some of your own code may call search methods that are deprecated. You want to find and fix it now, before anything else changes, because the failure mode is a silent one that surfaces months later.
Everything this step looks for is listed on the deprecations page, with the release each item was deprecated in and its replacement.
Before you change anything, read 1.3. Widget code and Velocity steps in workflows have no version history. A bad edit there cannot be undone.
1.1 Sweep Your Templates#
Run this over your templates, widgets and .vtl files:
grep -rn "esSearch\|esRaw" <path-to-your-vtl>Also check the two places templates hide:
# VTL served as an API
grep -rn "esSearch\|esRaw" <dotcms>/application/apivtl/
# everything dotCMS has actually rendered, database-stored templates included
grep -rln "esSearch\|esRaw" <dotcms>/WEB-INF/velocityExpect
No matches. Nothing in your templates calls the deprecated methods; move to 1.2.
If you get matches
| What you found | What to do |
|---|---|
$estool.esSearch(...) | Replace with $estool.search(...). Templates and Viewtools covers what changes in the result. |
$estool.esRaw(...) | Replace with $estool.raw(...). See Templates and Viewtools. |
.toString() on a raw result | The highest-risk case. It no longer returns JSON and nothing errors. Templates and Viewtools has the replacement. |
| Nothing in the greps, but you have Velocity steps in a workflow | No search reaches those. Open your workflow schemes and read the script steps by hand. |
A widget that is only #dotParse('...') | The real code is in that file. Follow it. |
Record the list of affected templates and who owns each one. You will want it in Step 4.
Why walking your site will not find these. The deprecated methods ignore the position setting and read Elasticsearch directly. Through positions 0, 1 and 2 both engines hold the same content, so a page calling them returns exactly what it always did — correct results, no error, nothing in the log. Browsing the site after a position change surfaces nothing.
What happens at position 3 depends on your release. From 26.09.23-01 these methods refuse to run there: rather than answer from an Elasticsearch index that no longer receives writes, they fail. For a template that means the page render fails. On earlier releases they keep answering from a frozen Elasticsearch and go quietly stale instead, breaking only when you switch the old engine off.
Either way this grep is the only way to find them before they cost you something, and on a current release the cost arrives at cutover rather than months later. Full explanation in Templates and Viewtools.
1.2 Sweep Your Plugins#
Run this over every plugin jar you have deployed:
for jar in <path-to-your-plugins>/*.jar; do
echo "--- $jar"
unzip -p "$jar" '*.class' 2>/dev/null | strings | grep -o "esSearch\|esSearchRaw\|getEsSearchAPI\|IndiciesAPI\|ESSearchResults\|createSnapshot\|uploadSnapshot" | sort -u
doneExpect
No output under any jar. Your plugins do not touch the deprecated surface.
If you get matches
| What you found | What it means |
|---|---|
esSearch / esSearchRaw | The plugin calls the deprecated search methods. Mechanical fix — Plugins. |
getEsSearchAPI | Same family, reached through APILocator. Plugins. |
ESSearchResults | The plugin depends on the Elasticsearch-typed return value, so the fix is slightly larger than a rename. Plugins. |
IndiciesAPI | Index metadata API, separately deprecated. Three of its replacements are not drop-in. Plugins. |
createSnapshot / uploadSnapshot | dotCMS's wrapper around the Elasticsearch snapshot API. Elasticsearch-only, with no OpenSearch implementation, so it stops working at Step 5. Nothing in dotCMS calls it — if your plugin does, call your cluster's own snapshot API instead, which OpenSearch provides. |
If you do not have the source for a plugin, you need whoever does — and start that conversation now rather than at Step 5. On 26.09.23-01 and later, a plugin calling these methods throws DotStateException the moment you reach position 3. On earlier releases it keeps working until the old engine is switched off and fails then. Either way it fails; the current release just fails it earlier and more visibly.
1.3 Copy Code Out First#
Do this first, for every location you found.
Templates and files under version control are fine. The following are not, and have no undo:
- Widget code — edited in the content editor, no history
- Velocity script steps in workflow schemes — same
- Templates stored in the database rather than as files — same
Copy each one into a file on disk, or anywhere you can get it back from. This costs a few minutes and is the only protection you have.
Expect
A saved copy of every location on your list before a single edit.
1.4 Make the Changes#
The replacements are direct:
| Stop using | Use instead |
|---|---|
$estool.esSearch($query) | $estool.search($query) |
$estool.esRaw($query) | $estool.raw($query) |
Three things change when you swap, and none of them raises an error:
$item.map.fieldNamestops resolving. Results are nowContentMapobjects, which have nomapproperty. Read the field directly:$item.fieldName.- Aggregation names come back lowercased. An aggregation declared
"tagAgg"is keyedtagaggin the response. Looking it up under the name you wrote returns null, and a#foreachover null renders nothing. $raw.toString()no longer produces JSON. Use$json.generate($raw)— but note it produces dotCMS's neutral shape, not Elasticsearch's, so anything downstream that parsed the old output needs remapping. Templates and Viewtools has the key-by-key mapping.
While you are testing, replace quiet references ($!{...}) with ${...} in the templates you changed. The quiet form prints nothing when an expression fails, so a template that has lost a value looks like a page with a blank spot rather than like an error. Switch them back when you are done.
Expect
Each changed template renders the same content it did before.
If not
| Symptom | Cause |
|---|---|
| A value silently disappeared | Almost certainly $item.map.field. See above. |
| An aggregation loop renders nothing | The name is lowercased. Lowercase it in both the query and the lookup. |
| A page renders but JavaScript on it breaks | $raw.toString() was feeding it JSON. Templates and Viewtools. |
| "Unable to parse the given query" | The query is Lucene syntax, not JSON. Queries Are JSON. |
Step 2: Set Up the New Engine#
You need an OpenSearch 3.x cluster, reachable from every dotCMS node, on separate infrastructure from your current engine.
2.1 Confirm Version and Separation#
Run this
curl -sk -u "$OS_AUTH" "$OS_URL/" | jq .version.numberExpect
A version beginning with 3. — for example 3.8.0. dotCMS checks this at startup and refuses to migrate if it is anything else.
If not
| What you see | What it means |
|---|---|
A 1.x or 7.x version | $OS_URL is pointed at your current engine, not the new one. The most common mistake here — check the port as well as the host. |
| Nothing, or a certificate error | TLS. See TLS and Certificates. |
403 | The account is missing cluster:monitor/main. Do not skip this — see 2.3. |
| Connection refused | Not reachable from where you are running this. It also has to be reachable from every dotCMS node, which is a different question — check both. |
Then confirm the separation yourself. dotCMS compares the two endpoints at startup and reports the result, but the check is best-effort by design — its own documentation names 127.0.0.1 against localhost as a case it will not detect. Check by hand that this is genuinely different infrastructure.
Note also that the separation check is skipped at position 3, because Elasticsearch is decommissioned there and its endpoint setting is no longer required, so comparing the two would report a false positive on a legitimate configuration.
Why it has to be a separate server. Both engines run at once for most of the migration, each holding a full copy of your content. One server pointed at twice looks like two engines to the check and like one engine to everything else, producing a migration that appears to work and mirrors nothing. The Four Positions has the rest.
2.2 Settle Certificates#
Run the same command as 2.1 without -k:
curl -s -u "$OS_AUTH" "$OS_URL/" | jq .version.numberExpect
The same version string. Your certificate chain is trusted and dotCMS will not need any TLS concessions.
If not
If it fails without -k and succeeds with it, your certificate is self-signed or issued by a CA the system does not trust. You have two options, and TLS and Certificates covers both in full: install the certificate into the trust store used by dotCMS, or tell dotCMS to accept it. Decide now rather than at 2.5 — settling this after dotCMS is already failing to start is considerably less pleasant.
2.3 Create a Service Account#
dotCMS needs an OpenSearch account with permission to manage and query its indexes, plus one cluster-level permission that is easy to miss.
It must have cluster:monitor/main. This is the permission dotCMS uses to ask the cluster who it is. Without it, startup validation fails — and at positions 1 and 2 the consequence is not an error you will notice. dotCMS returns to position 0 and serves from Elasticsearch, logging at ERROR and raising no readiness blocker. The migration switches itself off and the site carries on looking fine.
The full permission list, with the reason for each one, is in The Service Account.
Note for later: from position 3 onward this account becomes load-bearing for startup itself. If it stops working — a rotated password, an expired credential — dotCMS will not start at all. See 5.5 and Startup Validation.
2.4 Prove the Account Works#
Run this as the service account, not as an administrator:
curl -sk -u "$OS_AUTH" "$OS_URL/" | jq .version.number
curl -sk -u "$OS_AUTH" "$OS_URL/_cat/indices?v"Expect
The version string from the first, and a listing (probably empty) from the second. Both must succeed under the service account's own credentials.
If not
| What you see | What it means |
|---|---|
403 with no permissions for [cluster:monitor/main] | Exactly the failure 2.3 warns about. Fix it here; it is invisible later. |
401 | Wrong password, or the user does not exist. |
Version works, indices 403 | Index permissions are too narrow. The Service Account. |
2.5 Point dotCMS at It#
Set these on every dotCMS node:
DOT_OS_ENDPOINTS=https://your-new-opensearch-host:9200
DOT_OS_USER=your-service-account
DOT_OS_PASS=itspasswordLeave the position setting alone for now — you are pointing dotCMS at the new engine without yet telling it to use it.
Restart dotCMS, then:
docker compose logs dotcms | grep -i "IndexStartupValidator"(Adapt to however you read logs — the class name is what matters.)
Expect
Three lines, and all three should be there:
INFO IndexStartupValidator - OS version check passed: 3.8.0
INFO IndexStartupValidator - Endpoint separation check passed. ES: [...] — OS: [...]
INFO IndexStartupValidator - OpenSearch startup validation PASSED — connected to OS successfullyThis is what a healthy boot looks like. Learn it now, while nothing depends on it, so their absence is conspicuous later.
If not
| What you see | What it means |
|---|---|
version mismatch: expected 3.x | DOT_OS_ENDPOINTS points at the wrong cluster. |
not reachable: Unauthorized access | Credentials. Note that the message advises checking endpoints — for a 401 it is the credentials, whatever it says. |
not reachable: Forbidden access | Permissions, almost always cluster:monitor/main. |
Nothing from IndexStartupValidator at all | The variables did not reach the container. Check the environment the process actually sees, not the file you edited. |
Step 3: Start Dual-Write#
From here dotCMS writes every change to both engines. Reads still come from Elasticsearch, so nothing about your site changes.
3.1 Access the Readiness Report#
The readiness endpoint is restricted to a named role, so that index internals are not exposed to every back-end user.
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jqExpect
A JSON document with phase, verdict and per-index detail.
If you get a 403
Access requires two things, not one: the account must be a CMS administrator and hold the support role. A plain administrator is not enough, and neither is the role on its own.
The role defaults to os_migration_qa and is configurable via OS_MIGRATION_INDEX_VISIBILITY_ROLE_KEY, so on an installation that changed it the role will not have the default name — check that setting before concluding the role is missing.
This endpoint is an internal support tool in every position. It never opens up to all administrators, which is why 5.5 asks you to close the role when you are finished.
3.2 Set the Position and Restart#
DOT_FEATURE_FLAG_OPEN_SEARCH_PHASE=1On every node. Then restart dotCMS.
An absent or unrecognised value means position 0, so a typo here does not fail loudly — it quietly does nothing. That is the first of the two reasons 3.3 exists.
3.3 Confirm the Position Took#
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jq '.phase'Expect
{
"current": 1,
"dualWrite": true,
"name": "PHASE_1_DUAL_WRITE_ES_READS",
"readEngine": "Elasticsearch",
"writeEngines": ["Elasticsearch", "OpenSearch"]
}If current is 0
Startup validation failed and dotCMS returned to position 0. The environment variable still says 1 — reading it back will tell you nothing. The log is where the reason is:
docker compose logs dotcms | grep -i "IndexStartupValidator"Fix what it names, restart, and check again. Do not proceed on the assumption that the position is set. This is the failure mode that produces a migration which appears to run for days and mirrors nothing. Startup Validation has the detail.
3.4 Full Reindex#
Dual-write handles everything that changes from now on. Your existing content needs a reindex to get across — this is Rule 1, and it is the step people skip.
Run this
curl -su "$DOT_AUTH" -X POST "$DOT/api/v1/esindex/reindex"Then watch it:
curl -su "$DOT_AUTH" "$DOT/api/v1/esindex/reindex" | jqExpect
Progress that advances and then completes, with an empty list of failures. On a small site this takes minutes. On a large one it can take hours — it is a background process and the site stays up throughout.
If not
| What you see | What to do |
|---|---|
| Failures listed | Note which content. Do not advance. Indexes and Reindexing. |
| Progress stalls | Check the dotCMS log for OpenSearch connection errors. |
| It completes suspiciously fast | Compare document counts in 3.5 before believing it. |
3.5 Wait and Confirm Agreement#
Let a normal content-editing cycle happen — someone publishes something, someone edits something. This is what you are actually testing: that dual-write works on your installation with your content.
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jq '.verdict'Expect
{
"blockers": [],
"outOfSyncCount": 0,
"safeToAdvance": true,
"safeToRollback": true
}Also watch for this in your log, throughout position 1:
WARN ContentletIndexAPIImpl - OS shadow write failed in putToIndex —
OS index may diverge until next reindex. Cause: <host>This line is an action item, not a status message. It means a document reached Elasticsearch and did not reach OpenSearch. The write is not retried and nothing is queued to recover it — the only repair is another full reindex. If you see it, note the time, find out what was wrong with OpenSearch at that moment, fix it, and run 3.4 again before advancing.
If not
| What you see | What to do |
|---|---|
outOfSyncCount above 0 | Run a full reindex (3.4) and re-check. |
| Blockers naming a missing OpenSearch index | Same answer — reindex. The Readiness Report explains how the report matches indexes, which is worth knowing before you interpret this. |
safeToAdvance: false with no blockers listed | Unexpected. Stop and read The Readiness Report. |
Step 4: Move Your Searches#
Reads now come from OpenSearch. Both engines are still written to, so Elasticsearch stays current and you can go back at any time.
This is the step that actually tests the migration. Everything before it was preparation.
Before you start: from here on, an OpenSearch problem is a visible problem. Position 2 serves your site's search from the new engine, so if OpenSearch becomes unreachable, search breaks and content publishing fails with an error. That is the trade you are making in exchange for finding out whether OpenSearch serves your site correctly while Elasticsearch is still intact.
4.1 Confirm It Is Safe to Advance#
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jq '.verdict'Expect
safeToAdvance: true, outOfSyncCount: 0, no blockers.
If not
Do not advance. Resolve what the report names first — in nearly every case that means a full reindex (3.4) followed by another check. Advancing with blockers outstanding means moving reads to an engine the report has told you is incomplete.
4.2 Set the Position and Restart#
DOT_FEATURE_FLAG_OPEN_SEARCH_PHASE=2On every node. Then restart dotCMS.
4.3 Confirm the Position Took#
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jq '.phase'Expect
{
"current": 2,
"dualWrite": true,
"name": "PHASE_2_DUAL_WRITE_OS_READS",
"readEngine": "OpenSearch",
"writeEngines": ["Elasticsearch", "OpenSearch"]
}This is the most important check in the guide. If startup validation failed here, dotCMS is at position 0 and reading from Elasticsearch — and because Elasticsearch is still perfectly current at this stage, your site will look completely normal. You can walk every page, run every search, find nothing wrong, and conclude that position 2 works. You will have tested nothing.
readEngine: OpenSearch is the line that tells you the test is real.
If current is not 2, read the log for the reason, fix, restart, and check again before doing anything else:
docker compose logs dotcms | grep -i "IndexStartupValidator"4.4 Walk the Site#
Now exercise it. Search-driven pages, faceted navigation, anything with a content listing, Site Search if you use it, and the back-end content search.
Expect
Results identical to what you saw before. Ordering may differ very slightly on equally-scored results; content should not.
If not
| Symptom | Cause |
|---|---|
| A page's results are empty where they were populated | Most likely an aggregation name, or $item.map.field — 1.4, and Templates and Viewtools. |
| Results present but ordered differently | Usually harmless. If it matters, Query Normalization covers scoring and normalization. |
| A page throws an error mentioning the search engine | Check OpenSearch is up, then Troubleshooting. |
| Publishing content fails with a message naming your OpenSearch host | OpenSearch is unreachable. At position 2 that fails the publish. See Startup Validation. |
A page behaves exactly as before, and it calls esSearch | Expected, and not reassuring — it is reading Elasticsearch. See Templates and Viewtools. |
Recheck the templates from 1.1. If Step 1 came back with matches, those pages are the ones that will not tell you the truth here. They read Elasticsearch regardless of position, so they will look correct at position 2 and fail after Step 5. Verify them by reading the code, not by loading the page.
4.5 Wait#
Sit here. Longer than feels necessary.
Position 2 is the only point in the migration where OpenSearch is serving real traffic and Elasticsearch is still a complete, current fallback. Every day you spend here is a day of your actual content, your actual editors and your actual visitors testing the new engine at no risk. Once you take Step 5 that safety net is gone.
Keep watching for the shadow-write warning. It means the same thing here as at position 1: a document reached one engine and not the other, permanently, until a reindex.
To go back at any point, set the position to 1 and restart. Elasticsearch has been kept current throughout, so nothing is lost.
Step 5: Finish#
OpenSearch becomes the only engine. Elasticsearch stops being written to and stops being read.
This step is not reversible in the way the previous ones were. You can set the position back to 2, but Elasticsearch will have stopped receiving writes the moment you moved to 3, so it will be behind by however long you were at position 3. Going back means going back to a stale engine, and putting it right means a full reindex. Treat Step 5 as a decision rather than a step.
5.1 Last Check#
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jqExpect
safeToAdvance: true, outOfSyncCount: 0, no blockers, and every index — content and Site Search — present on both sides with matching document counts.
Read the whole report this time, not just the verdict. This is the last point at which a discrepancy is cheap to fix.
If not
Reindex and recheck. Do not advance with anything outstanding.
5.2 Set the Position and Restart#
DOT_FEATURE_FLAG_OPEN_SEARCH_PHASE=3On every node. Then restart dotCMS.
5.3 Confirm the Position Took#
Run this
curl -su "$DOT_AUTH" "$DOT/api/v1/index/migration/readiness" | jq '.phase'Expect
{
"current": 3,
"dualWrite": false,
"name": "PHASE_3_OPENSEARCH_ONLY",
"readEngine": "OpenSearch",
"writeEngines": ["OpenSearch"]
}If dotCMS did not come up at all, that is this position behaving correctly. From position 3 OpenSearch is the primary store, so dotCMS will not silently fall back to Elasticsearch — it retries the connection and then stops rather than serving from an engine it is no longer maintaining. Read the log:
docker compose logs dotcms | grep -i -E "OSIndexAPIImpl|SystemExitManager"The message names a likelyCause and what to do about it. Fix that, and dotCMS starts.
This is the one position where the check at 5.3 is a formality — the position cannot fail to take quietly here, because the alternative to taking it is not starting.
5.4 Confirm, Then Leave the Old Engine#
Walk the site once more. Run the searches you ran at 4.4.
Then leave Elasticsearch running and untouched for a while. Days at least. It is no longer being written to, so it is going stale from this moment — but while it exists you still have a readable copy of what your search index looked like at cutover, and that is worth having if something turns out to be wrong.
Do not reindex it. Do not repurpose the hardware yet. Just leave it.
5.5 After the Migration#
Retire the old engine. Once you are confident — a couple of weeks is a reasonable default — shut Elasticsearch down and reclaim it.
This is when deprecated code fails. Anything Step 1 found and you did not fix has been quietly reading Elasticsearch this entire time and returning correct-looking results. It breaks here, at a moment nobody will connect to the migration. If Step 1 produced a list you did not finish, finish it before you switch the old engine off.
Close the readiness role. The role granting access to the readiness endpoint exposes index internals. Remove the members you added in 3.1 now that the migration is over.
Understand what is now yours to run. Three things changed permanently:
- OpenSearch is a hard startup dependency. If dotCMS cannot reach and authenticate to OpenSearch when it boots, it will not start. Not degraded search — no start. Under an orchestrator that is a crash loop.
- Rotating the OpenSearch service account password is now a change that can take the CMS down. Treat it like a database credential, because operationally that is what it now is.
- Your search cluster is production infrastructure. Backups, monitoring, disk headroom and upgrade planning for OpenSearch now sit in the same category as your database.
Startup Validation covers the startup behaviour in full.
Where to Go Next#
The OpenSearch Migration Reference carries the detail behind every step above:
| The Four Positions | What each position does, and why OpenSearch must be 3.x |
| The Readiness Report | Every field, and what the report cannot see |
| TLS and Certificates | Settings in full, and the two things that catch people |
| The Service Account | The complete permission set, permission by permission |
| Templates and Viewtools | What changed in $estool, and what did not |
| Plugins | The three levels of change, with the mechanical fix for each |
| Queries Are JSON | Why Lucene syntax is rejected |
| Query Normalization | Lowercasing, and what it costs you |
| Indexes and Reindexing | Naming, generations, and what a reindex actually does |
| Site Search | Crawls, rebuilds, and the mirror condition |
| Troubleshooting | Symptom → cause → section |
| Command Reference | Every command in this guide, in one place |
| Startup Validation | What dotCMS checks, and what it does on failure |