OpenSearch Connector Configuration Reference
Subscription Required
Configure Liferay’s connection to OpenSearch with configuration files deployed to Liferay’s osgi/configs
folder. You can also verify and adjust the configuration with the corresponding System Settings entries: OpenSearch and OpenSearch Connections.
| System Settings Entry | Configuration File | Description |
| :— | :— | : — |
| OpenSearch | com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config
| Set the connection ID for the active OpenSearch connection and configure how Liferay’s indexes and mappings should behave. |
| OpenSearch Connections | com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-[connectionId].config
| Set up distinct connections to OpenSearch, with all the unique properties to connect Liferay and OpenSearch successfully. |
You can define multiple connections to OpenSearch and select which one to use. If using factory configuration files, provide a separate OpenSearchConnectionConfiguration
file for each connection. You can use the same ID in the file name and as the connectionId
property. These files define REMOTE1
and REMOTE2
connections:
com.liferay.portal.search.opensearch7.configuration.OpenSearchConnectionConfiguration-REMOTE1.config
com.liferay.portal.search.opensearch7.configuration.OpenSearchConnectionConfiguration-REMOTE2.config
When you deploy configuration files to [Liferay_Home]/osgi/configs
, a listener auto-detects the configurations and writes them to the database.
OpenSearch Connection Configurations
System Settings Field Name | Configuration File Syntax and Default Value Description (Click to Expand) |
---|---|
Active | Activate or deactivate the connection as needed. Do not deactivate a connection if it’s selected in the OpenSearch configuration’s Remote Cluster Connection ID setting. |
Connection ID | Set a unique ID for the connection. If active, this connection becomes available to select in the OpenSearch configuration’s Remote Cluster Connection ID property. |
Network Host Addresses | Set the remote HTTP hosts to connect to. |
Authentication Enabled | Enable or disable authentication to OpenSearch with a user name and password. |
Username | Set the user name for authenticating to OpenSearch if Authentication Enabled is checked. |
Password | Set the password for authenticating to OpenSearch if Authentication Enabled is checked. |
HTTP SSL Enabled | Enable or disable TLS/SSL. |
Maximum Connections | Set the maximum number of HTTP connections. |
Maximum Connections Per Route | Set the maximum number of HTTP connections per route. |
Truststore Type | If HTTP SSL is enabled, set the truststore type. Choose a format supported by your JDK version (e.g., |
Truststore Path | Set the path to the truststore file if HTTP SSL Enabled is checked. |
Truststore Password | Set the password to the truststore if HTTP SSL Enabled is checked. |
Proxy Host | Set the proxy host for the client connection. |
Proxy Port | Set the proxy port for the client connection. |
Proxy Username | Set the proxy user name for a proxy connection. |
Proxy Password | Set the password for connecting to the proxy. |
OpenSearch Configurations
System Settings Field Name | Configuration File Syntax and Default Value Description (Click to Expand) |
---|---|
Remote Cluster Connection ID | Choose the connection ID for a connection to the remote OpenSearch cluster. The available connections are defined in the OpenSearch Connections System Settings entry. If this value is not set, the connection configurations in the OpenSearch entry are used for the remote cluster connection. |
Requires Reindex Index Name Prefix | Set a String value to use as the prefix for the search index name. The default value should not be changed under normal conditions. If you change it, you must also perform a reindex all operation and then manually delete the old index. |
Requires Reindex Number of Company and System Index Replicas | Set the number of replicas for each Liferay company and system index. If unset, no replicas are used. Changing this value requires reindexing all content. The default value is defined in a file called |
Requires Reindex Number of Company and System Index Shards | Set the number of shards to use when a Liferay company and system index is created. If unset, a single shard is used. Changing this value requires reindexing all content. The default value is defined in a file called |
Max Result Window | Set the maximum number of results to return from a search query. Do not use this property while simultaneously setting |
Requires Reindex Additional Index Configurations | Set the String values for custom settings for the Liferay index, in JSON or YML format. |
Requires Reindex Additional Type Mappings | Set the String values for custom mappings for the |
Requires Reindex Override Type Mappings | Settings here override Liferay’s default type mappings. This is an advanced feature that should be used only if strictly necessary. If you set this value, the default mappings in Liferay’s source code (for example, |
Log Exceptions Only | A Boolean setting that, when true, only logs exceptions from OpenSearch, and does not re-throw them. |
Track Total Hits | If enabled, hits are accurately counted when there are more than 10,000 results for a search. Leaving this enabled may have an impact on performance when there is a large number of hits for a search. |