Elasticsearch 6 is supported for Digital Enterprise subscribers. The exact supported Elasticsearch version range depends on the Fix Pack Level: consult the compatibility matrix for details. Community Edition users running 7.0 CE GA 7 or greater can use up to Elasticsearch 6.1.x. If you’re not already running a remote Elasticsearch 2.x server, follow the installation guide to install Elasticsearch 6 and the configuration guide to configure the Elasticsearch adapter. Here, you’ll learn to upgrade an existing Elasticsearch 2.x server (or cluster) to Elasticsearch 6.5.x:
Install and configure Elasticsearch 6.5.x.
Download the Elasticsearch 6 adapter from Liferay Marketplace.
Stop the default Elasticsearch adapter.
Stop the Elasticsearch 2.4 server.
Start Elasticsearch 6.
Install and configure the Elasticsearch 6 adapter.
Re-index all search and spell check indexes.
Before Proceeding: Back up your existing data before upgrading Elasticsearch. If something goes wrong during or after the upgrade, roll back to 2.x using the uncorrupted index snapshots. See here for more information.
Download Elasticsearch 6.5.x and unzip it wherever you please.
Name the cluster by configuring the
Install the following required Elasticsearch plugins:
To install these plugins, navigate to Elasticsearch Home and enter
./bin/elasticsearch-plugin install [plugin-name]
Replace [plugin-name] with the Elasticsearch plugin’s name.
Once installed, start Elasticsearch 6 by running
from Elasticsearch Home.
Download the Elasticsearch 6 adapter LPKG from Liferay Marketplace.
Before installing the Elasticsearch 6 adapter, you must stop the running Elasticsearch adapter that ships with Liferay DXP.
Blacklist the Elasticsearch, Shield, and Marvel plugins. Create a
file with these contents:
Place the file in
Alternatively, use the App Manager.
Navigate to Control Panel → Apps → App Manager.
Search for elasticsearch. Find the Liferay Portal Search Elasticsearch module and click the edit (()) button. Choose the Deactivate option. This leaves the bundle installed, but stops it in the OSGi runtime.
If you’re using the Shield and Marvel integration plugins, make sure you uninstall those, too.
Then stop Elasticsearch 2.x. If you’re wondering whether your log should be complaining vociferously at this point, the answer is a definitive yes. You’ll resolve that in the next step.
Once the default adapter is stopped, install the Elasticsearch 6 adapter (the
LPKG you downloaded) by placing it in your Liferay Home folder’s
for more information.
Now configure the adapter to find your Elasticsearch cluster by specifying the correct Cluster Name and setting Operation Mode to REMOTE. Make sure the Transport Address matches the one Elasticsearch is using. If testing locally with Elasticsearch’s default settings, the default value in the adapter works fine (localhost:9300).
Once the Elasticsearch adapter is installed and talking to the Elasticsearch cluster, navigate to Control Panel → Configuration → Server Administration, and click Execute for the Reindex all search indexes entry.
You must also re-index the spell check indexes.
Stuff happens. If that stuff involves an unrecoverable failure during the upgrade to Elasticsearch 6, roll back to Elasticsearch 2 and regroup.
Since Elasticsearch 2 and Elasticsearch 6 are two separate installations, this procedure is straightforward:
Stop and remove the Elasticsearch 6 adapter.
Reinstall the Elasticsearch 2 adapter.
Make sure that
elasticsearch.ymland the Elasticsearch 2 adapter’s configuration are configured to use the same port (9200 by default).
Learn more about configuring Elasticsearch in this article.