Search Service (Elasticsearch)

The Elasticsearch service is the text search engine for your Liferay DXP application. It’s a private service that only communicates with the other services in your application, not with the outside internet.

The Elasticsearch service is one of several services available in Liferay Cloud.

See the Search service limitations section for more information.

Configurations

Although Liferay Cloud’s services are fine-tuned to work well by default, you may need to configure Elasticsearch further. To do so, you can include any YML file inside the appropriate configs/[ENV]/config/ folder. When you deploy your changes, the file is automatically injected into your service and overwrites the default configuration. Here’s an example folder structure of such a file inside the correct folder:

search
├── configs
│   └── common
│       └── config
│           └── elasticsearch.yml
└── LCP.json
Important

You must use the elasticsearch.yml configuration file to configure Elasticsearch. Configuring Elasticsearch through the UI will be overwritten on each deployment.

Warning

The search service’s LCP.json file contains this value by default: "podManagementPolicy": "Parallel". Removing this value from the LCP.json can cause the search service to fail to start when there are multiple clustered instances, because Elasticsearch nodes must connect to each other to start up successfully.

Scripts

You can use scripts for more extensive customizations. However, use caution when doing so. This is the most powerful way to customize the search service and can cause undesired side effects. Any .sh files found in a scripts/configs/[ENV]/scripts/ folder are run prior to starting your service. For example, to include a script that removes all log files, you could place it in this directory structure:

search
├── configs
│   └── common
│       └── scripts
│           └── elasticsearch.yml
└── LCP.json

Key Deployment Directories Reference

File TypePathDescription
Elasticsearch configurationssearch/configs/[ENV]/config/The elasticsearch.yml file with your search configurations.
Custom shell scriptssearch/configs/[ENV]/scripts/Scripts here automatically run when the service starts.
Elasticsearch licensessearch/configs/[ENV]/license/Elasticsearch license files.
Note

The Liferay Cloud Support team normally manages your Elasticsearch licenses for you. However, you can deploy your own Elasticsearch licenses if needed for testing.

Environment Variables Reference

All environment variables and other forms of configuration for Elasticsearch are in the official Elasticsearch documentation. You can set such configurations and environment variables in the configs/[ENV]/config/ directory and LCP.json, respectively. Examples include:

NameValueDescription
ES_JAVA_OPTS-Xms4g -Xmx4gJava settings for the ES instance

Capabilities

Product

Contact Us

Connect

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