The following features are deprecated or retired. Review details and recommendations to plan migrations.
Showing 1-7 of 7 deprecations (filtered from 28 total)
Scheduled for removal on March 31, 2027. Current behaviour depends on the release. Before 26.09.23-01 these methods keep answering from Elasticsearch at every migration phase, and stop only when that cluster is decommissioned. From 26.09.23-01 they refuse to run once an installation reaches the final migration phase, rather than answering from an index that no longer receives writes.
Plugins and integrations calling the Elasticsearch-typed search methods should move to their vendor-neutral equivalents.
Stop using | Use instead |
|---|---|
ContentletAPI.esSearch(...) | ContentletAPI.search(...) |
ContentletAPI.esSearchRaw(...) | ContentletAPI.searchRaw(...) |
APILocator.getEsSearchAPI() | APILocator.getSearchAPI() |
ContentletAPIPreHook.esSearch / esSearchRaw | ContentletAPIPreHook.search / searchRaw |
ContentletAPIPostHook.esSearch / esSearchRaw | ContentletAPIPostHook.search / searchRaw |
The replacements are default interface methods, so existing implementors inherit them without change, and the hook replacements have no-op default bodies — override them only if you actually intercept search.
Return types change from Elasticsearch classes to neutral ones: ESSearchResults becomes ContentSearchResults<Contentlet>, which is a typed List<T> — the old (Contentlet) casts go away — and org.elasticsearch.action.search.SearchResponse becomes ContentSearchResponse. ElasticsearchException becomes DotSearchException, which extends DotRuntimeException and so stays unchecked; only code that explicitly catches the Elasticsearch type needs an edit.
Watch the imports. IndexStats, ClusterStats and NodeStats each exist in more than one package. Use the versions in com.dotcms.content.index.domain — importing an older one compiles cleanly and fails later at runtime.
A note on scope. Everything in com.dotcms.content.index.*, the engine-specific implementations, and anything reached through CacheLocator or FactoryLocator exists so dotCMS can swap search engines. It is not an extension surface. Plugins should stay on APILocator and the published interfaces.
dotCMS is migrating its search layer from Elasticsearch to OpenSearch. The deprecated methods return Elasticsearch-specific types, which cannot be provided once Elasticsearch is no longer in use.
They also bypass dotCMS's search engine routing entirely and read Elasticsearch directly, whatever engine the rest of the installation is using. While an installation is dual-writing, that means a plugin can return results from one engine while the surrounding site returns results from another, with no error raised and nothing recorded in the logs.
From 26.09.23-01 this stops being silent at the end: at the final migration phase the methods throw DotStateException rather than answer from an Elasticsearch index that is no longer being written to. The divergence window is therefore the dual-write phases, not the whole migration.
Scheduled for removal on March 31, 2027. Current behaviour depends on the release. Before 26.09.23-01 these methods keep answering from Elasticsearch at every migration phase, and stop only when that cluster is decommissioned. From 26.09.23-01 they refuse to run once an installation reaches the final migration phase, rather than answering from an index that no longer receives writes.
Templates calling the Elasticsearch-typed viewtool methods should move to their neutral equivalents:
Stop using | Use instead |
|---|---|
$estool.esSearch($query) | $estool.search($query) |
$estool.esRaw($query) | $estool.raw($query) |
To find affected templates, including widget code and workflow scripts: grep -rn "esSearch\|esRaw" <your-templates>
Check your aggregation names when you make the swap. $estool.search() and $estool.raw() normalize the whole query before executing it, so an aggregation declared as "tagAgg" comes back keyed tagagg. $results.aggregations.get("tagAgg") returns null, and a #foreach over null renders nothing rather than raising an error. Lowercase the name in both the query and the lookup.
Separately — if you are on 26.05.19-01 or later, $estool.search() and $estool.raw() have already changed. Most templates are unaffected: #foreach, $results.size(), $item.title, $results.aggregations, $results.hits and $results.response all continue to work, and the structure of the aggregation tree is unchanged. Three things did change:
$item.map.fieldName no longer resolves on search() results. Items are now ContentMap objects, which have no map property. Read the field directly — $item.fieldName. The old expression silently returns nothing.
$raw.toString() no longer produces JSON. Use $json.generate($raw) instead. It produces dotCMS's neutral response shape, not Elasticsearch's: took is tookInMillis, hits.total is hits.totalHits, and _index / _id / _score / _source are index / id / score / sourceAsMap. Anything downstream that parsed the old output will need remapping to the new keys. Elasticsearch's own wire format is not available under any method.
$r.took is now $r.tookInMillis, a plain number of milliseconds.
While testing a converted template, replace any quiet references ($!{...}) with ${...} so a failed expression is visible rather than rendering as a blank space.
Full detail: Elasticsearch Viewtool.
dotCMS is migrating its search layer from Elasticsearch to OpenSearch. The deprecated methods return Elasticsearch-specific types, which cannot be provided once Elasticsearch is no longer in use.
They also bypass dotCMS's search engine routing entirely and read Elasticsearch directly, whatever engine the rest of the installation is using. While an installation is dual-writing, a page can therefore serve results from one engine while everything around it serves another — with no error, and nothing in the logs to indicate it.
From 26.09.23-01 this stops being silent at the end: at the final migration phase these methods fail the page render instead of answering from an Elasticsearch index that is no longer being written to. Support can enable FEATURE_FLAG_OPEN_SEARCH_LEGACY_ES_SEARCH_RETURNS_NULL to have them return nothing and log a rate-limited warning instead of failing the render.
One further difference: esSearch() returns raw content objects rather than ContentMap, which is why $item.map.fieldName works there. That also exposes a field-shadowing problem — a custom field whose name matches a built-in getter, such as contentTypeId, resolves to the getter rather than your field's value. Moving to search() resolves it.
Scheduled for removal on March 31, 2027, by which time the migration to Opensearch will be complete.
Plugins using the index metadata API should move to the versioned replacement. Note the spelling correction — Indicies becomes Indices.
Stop using | Use instead |
|---|---|
IndiciesAPI | VersionedIndicesAPI |
APILocator.getIndiciesAPI() | APILocator.getVersionedIndicesAPI() |
IndiciesInfo | VersionedIndices |
IndiciesFactory | IndicesFactory |
ContentletIndexAPI.timestampFormatter | ContentletIndexAPI.threadSafeTimestampFormatter |
Three of these are not drop-in replacements.
loadIndicies() becomes loadIndices(String version) — it takes a version argument, returns an Optional, and ignores legacy rows whose version is null. A plugin that assumed a single global index set has to decide which version it wants.
loadIndicies(Connection) has been split into loadAllIndices(), loadNonVersionedIndices() and loadDefaultVersionedIndices(), by intent. There is no connection-scoped variant in the new API.
point(IndiciesInfo) becomes saveIndices(VersionedIndices), which throws DotDataException when the object carries no version. The old method accepted anything, so this is the most likely upgrade break in this group.
The timestampFormatter replacement is worth taking now regardless of the migration: the old constant is a SimpleDateFormat, which is not thread-safe.
Index metadata is being made version-aware and vendor-neutral ahead of the migration from Elasticsearch to OpenSearch. The deprecated types sit in the Elasticsearch package and assume a single, unversioned index set.
Scheduled for removal on March 31, 2027. Only the seven endpoints listed here are deprecated. The rest of /api/v1/esindex is current, including the reindex endpoints used during the OpenSearch migration.
The deprecated endpoints pass their arguments as key/value pairs in the URL path, such as /index/{name} or /alias/{alias}. Their replacement takes the index name as a path parameter and the action as a query parameter.
Stop using | Use instead |
|---|---|
PUT /api/v1/esindex/activate/index/{name} | PUT /api/v1/esindex/{name}?action=activate |
PUT /api/v1/esindex/deactivate/index/{name} | PUT /api/v1/esindex/{name}?action=deactivate |
PUT /api/v1/esindex/clear/index/{name} | PUT /api/v1/esindex/{name}?action=clear |
PUT /api/v1/esindex/open/index/{name} | PUT /api/v1/esindex/{name}?action=open |
PUT /api/v1/esindex/close/index/{name} | PUT /api/v1/esindex/{name}?action=close |
GET /api/v1/esindex/active/type/{working|live} | GET /api/v1/esindex. Each index in the response carries active, building and closed flags |
PUT /api/v1/esindex/create/shards/{n} | No direct replacement. A full reindex (POST /api/v1/esindex/reindex) builds and activates new indices |
The replacement accepts either the short index name or the full physical name with the cluster prefix. It returns a readable 404 for an unknown index, and a 400 if you try to clear an index that is active or building.
Packing arguments into path segments is hard to validate and hard to document. 5.3.3 moved the index actions onto a single endpoint, and the old endpoints now forward to it.
If you have scripts calling the old endpoints, check them. From 5.3.3 until 26.06.29-01, the six PUT endpoints did not receive their path parameters. create returned a 500, and the other five ran against no index at all. 26.06.29-01 made them work again for compatibility. It did not make them current.
This has continuing relevance to migration from Elasticsearch to Opensearch.
Scheduled for removal on March 31, 2027. These methods work only against Elasticsearch. They have no OpenSearch implementation and stop being useful once Elasticsearch is decommissioned.
Take and restore index snapshots with the search engine's own snapshot API, not through dotCMS.
Stop using | Use instead |
|---|---|
ESIndexAPI.createSnapshot(repository, snapshot, index) | The search engine's snapshot API, against a registered repository |
ESIndexAPI.uploadSnapshot(...) (three overloads) | The search engine's restore API |
ESIndexAPI.getDefaultIndexSettings(int shards) | getDefaultIndexSettings(). The shards argument is already ignored |
If you are on OpenSearch, use OpenSearch's snapshot and restore API. Remember too that dotCMS's content indices are built from the database, so a full reindex can always rebuild them. A snapshot makes recovery faster. It is not the only way to recover.
These methods are harder to reach from 26.03.06-02 onward. APILocator.getESIndexAPI() now returns the vendor-neutral IndexAPI, which does not declare the snapshot methods. A call such as APILocator.getESIndexAPI().createSnapshot(...) no longer compiles. Casting the result to ESIndexAPI compiles but fails at runtime with ClassCastException, because the object returned is a router, not the Elasticsearch implementation.
Snapshots belong to the search engine, not to dotCMS. These methods wrap Elasticsearch's snapshot feature and add zip handling on the dotCMS server's local file system. That arrangement does not fit an external or managed cluster, which dotCMS began supporting in the same release.
The REST endpoints that exposed the same feature, /api/v1/esindex/snapshot/… and /api/v1/esindex/restoresnapshot/…, were deprecated in 5.3.0 and removed in 5.3.3. The Java methods are what remains.
This has continuing relevance to the migration from Elasticsearch to Opensearch.
Scheduled for removal on March 31, 2027. The index fields they named were already removed in 5.2.0, so queries that still use those field names have not worked since that release.
Before 5.2.0, dotCMS stored related identifiers in index fields named after the relationship plus a suffix, such as News-Comments-child. Those fields no longer exist. The identifiers are now stored under the relationship name alone.
Stop using | Use instead |
|---|---|
+{relationship}-child:{identifier} or -parent in a Lucene query | +{relationship}:{identifier} |
Sorting by {relationship}-order | $dotcontent.pullRelated(...) or pullRelatedField(...) in Velocity, ContentletAPI.getRelatedContent(...) in Java |
ESMappingConstants.SUFFIX_CHILD, SUFFIX_PARENT, SUFFIX_ORDER | Nothing. No part of dotCMS reads these constants |
For a relationship between two items of the same content type, the suffix told dotCMS which side you wanted. The pullParents argument of $dotcontent.pullRelated does that job now. ContentletAPI.getRelatedContent returns related content in the order you set.
To find affected code: grep -rn "\-child:\|\-parent:\|\-order\|SUFFIX_CHILD\|SUFFIX_PARENT\|SUFFIX_ORDER" <your-templates-and-plugins>
dotCMS 5.2.0 changed how relationships are stored in the search index. Related identifiers moved from suffixed fields into a single field per relationship. The three constants that named the old suffixes were kept so that code referencing them would still compile. They have had no effect since then.
A query that still names a suffixed field raises no error. It just matches nothing, so related-content listings built that way have been silently empty since 5.2.0.
This has continuing relevance to the migration from Elasticsearch to Opensearch.
Scheduled for removal on March 31, 2027. getFacets still works on both Elasticsearch and OpenSearch and is not affected by the migration.
Move from getFacets to getAggregations. The arguments are the same.
Stop using | Use instead |
|---|---|
$sitesearch.getFacets($index, $query) | $sitesearch.getAggregations($index, $query) |
SiteSearchAPI.getFacets(index, query) | SiteSearchAPI.getAggregations(index, query) |
In Java this is only a rename. Both methods return Map<String, Aggregation>.
In Velocity the result shape changes, because the viewtool's getFacets repackages each result into an older facet object:
Facet expression | Aggregation expression |
|---|---|
$facet.entries() | $agg.buckets, or iterate the aggregation directly: #foreach($bucket in $agg) |
$entry.term | $bucket.key |
$entry.time (date histogram) | $bucket.keyAsNumber |
$entry.count | $bucket.docCount |
$facet.name and $facet.type carry over unchanged as $agg.name and $agg.type.
To find affected templates: grep -rn "getFacets" <your-templates>
Elasticsearch replaced facets with aggregations. When dotCMS moved to Elasticsearch 6 in 5.0.0, getFacets was kept as a compatibility wrapper that converts aggregation results into the old facet shape.
The wrapper keeps only each bucket's key and count. Nested sub-aggregations are dropped. getAggregations returns the full result, including nested aggregations through $bucket.aggregations.