Documentation

Using the Sidecar or Embedded Elasticsearch

The Liferay Tomcat bundles installed via a ZIP file or Docker image include an Elasticsearch node that starts with Liferay. The node in Liferay 7.3 runs in a separate JVM as a sidecar server and the node in Liferay 7.2 is embedded in the Liferay server.

The Elasticsearch server is accessible at these URLs:

Here’s example sidecar server output:

{
  "name" : "liferay",
  "cluster_name" : "LiferayElasticsearchCluster",
  "cluster_uuid" : "DGRDj1_DS7Km2Y_kaaNqxg",
  "version" : {
    "number" : "7.9.0",
    "build_flavor" : "unknown",
    "build_type" : "unknown",
    "build_hash" : "a479a2a7fce0389512d6a9361301708b92dff667",
    "build_date" : "2020-08-11T21:36:48.204330Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

While the bundled Elasticsearch servers are convenient for development and testing, neither is suitable for production.

Note

While it’s not a supported production configuration, installing Kibana to monitor the bundled Elasticsearch server is useful during development and testing. Just be aware that you must install the OSS only Kibana build.

You wouldn’t run an embedded database like HSQL in production, and you shouldn’t run the bundled Elasticsearch server in production either. Instead, run Elasticsearch in remote mode, as a standalone server or cluster of server nodes.

Important

Synonym Sets and Result Rankings are applications that use the search index for primary data storage. No data is stored in the Liferay database. Therefore, if you have Synonym Sets or Result Rankings configured while using the sidecar or embedded Elasticsearch, switching to a remote Elasticsearch server and reindexing does not restore those configurations. Instead you must manually bring the Synonym Sets and Result Rankings into the remote Elasticsearch cluster. See the Upgrade Guide for details on using Elastic’s Snapshot and Restore feature to preserve these indexes.

Bundled Elasticsearch Server Use cases

Here are common uses for the default Elasticsearch server (sidecar and embedded):

App Server Differences

While an Elasticsearch sidecar server is bundled with Liferay DXP 7.3 and Liferay Portal CE 7.3 GA4+ Tomcat bundles and Docker images, there are some key differences if you’re installing the Liferay WAR onto any supported application server.

Liferay DXP Flavor Default Elasticsearch Pre-Installed Requires Manual Intervention
Tomcat bundle: 7.3 GA4+ Sidecar
Tomcat: 7.3 GA4+ Sidecar ✘ (auto-downloaded)
Docker tag: 7.3 GA4+ Sidecar
JBoss: 7.3 GA4+ Sidecar ✘ (auto-downloaded)
Wildfly: 7.3 GA4+ Sidecar ✘ (auto-downloaded)
WebSphere: 7.3 GA4+ Sidecar
Weblogic: 7.3 GA4+ Sidecar
All flavors: 7.2/7.3 GA3- Embedded

If you downloaded a bundle for an application server besides Tomcat, when you start the server an Elasticsearch distribution is downloaded on-the-fly and started as a sidecar server.

Installation instructions for Liferay DXP 7.3 on the WebSphere and Weblogic application servers include directions for manually providing the Elasticsearch archives required for the sidecar server to be initialized.

Important

The bundled Elasticsearch server is useful for development and testing purposes and must not be used in production. See Installing Elasticsearch to learn about installing a remote search engine.

Embedded Versus Sidecar

Here’s a comparison between the embedded and sidecar Elasticsearch servers.

EMBEDDED SIDECAR
Cannot configure a secure connection Cannot configure a secure connection
Uses the OSS version of Elasticsearch Uses the OSS version of Elasticsearch
Runs at http://localhost:9200 Runs at http://localhost:9201
Pre-Installed on all Liferay distributions Not Always Pre-Installed
Not supported for production Not supported for production
No special steps required for any app server Some app servers require additional steps