Installing and Upgrading a Search Engine

A search engine is a critical component of your Liferay installation. Creating an Example Cluster can get you started with an Elasticsearch installation, but this guide demonstrates setting up a production environment.

When you start Liferay, a built-in Elasticsearch server (sidecar) starts simultaneously. This default search engine provides search capabilities as a convenience for testing, but it isn’t supported for use in production. Getting Started with Elasticsearch describes production-level Elasticsearch setup. Using the Sidecar or Embedded Elasticsearch describes the default Elasticsearch server (sidecar in 7.3+ and embedded in 7.2) features and limitations.

Java Requirements

  • Search engines require the environment variable JAVA_HOME or ES_JAVA_HOME (Elasticsearch 8). Set it on your search engine host.

  • If you’re using Liferay 7.2, Elasticsearch and Liferay must use the same Java version and distribution. Consult the Elasticsearch compatibility matrix and Liferay’s Search Engine Compatibility Matrix to learn more about supported JDK distributions and versions. You can specify this in Elasticsearch’s [Elasticsearch Home]/bin/elasticsearch.in.sh file:

JAVA_HOME=/path/to/java

The Java version and distribution requirement doesn’t apply to Liferay 7.3+ because the Elasticsearch 7 connector communicates via HTTP; there’s no JVM-level serialization. See Elastic’s High-Level REST Client documentation for details.

The requirement doesn’t apply to Solr because the Solr connector also communicates via HTTP.

Clustering the Search Engine

A production environment’s search engine should be clustered for load management and optimal performance. Both Elasticsearch and Solr can be configured on multiple nodes in the remote environment.

Selecting a Search Engine Vendor and Version

Elasticsearch is the recommended search engine for search and indexing with Liferay. Solr is planned for deprecation and has limitations.

Important

Always refer to the Search Engine Compatibility Matrix to find the exact versions supported.

What’s Next

Installing Elasticsearch is recommended. If you must use Solr (deprecated), see Installing Solr.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy