OpenSearch Connector Configuration Reference

Subscription Required

Beta Feature

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
active=B"false"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
connectionId=""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
networkHostAddresses="[http://localhost:9200]"Set the remote HTTP hosts to connect to.
Authentication Enabled
authenticationEnabled=B"false"Enable or disable authentication to OpenSearch with a user name and password.
Username
username="opensearch"Set the user name for authenticating to OpenSearch if Authentication Enabled is checked.
Password
password=""Set the password for authenticating to OpenSearch if Authentication Enabled is checked.
HTTP SSL Enabled
httpSSLEnabled="false"Enable or disable TLS/SSL.
Maximum Connections
maxConnections="75"Set the maximum number of HTTP connections.
Maximum Connections Per Route
maxConnectionsPerRoute="75"Set the maximum number of HTTP connections per route.
Truststore Type
truststoreType="pkcs12"If HTTP SSL is enabled, set the truststore type. Choose a format supported by your JDK version (e.g., jks or pkcs12).
Truststore Path
truststorePath="/path/to/localhost.p12"Set the path to the truststore file if HTTP SSL Enabled is checked.
Truststore Password
truststorePassword=""Set the password to the truststore if HTTP SSL Enabled is checked.
Proxy Host
proxyHost=""Set the proxy host for the client connection.
Proxy Port
proxyPort="0"Set the proxy port for the client connection.
Proxy Username
proxyUserName=""Set the proxy user name for a proxy connection.
Proxy Password
proxyPassword=""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
remoteClusterConnectionId=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
indexNamePrefix="liferay-"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
indexNumberOfReplicas="0-all"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 index-settings-defaults.json shipped with the connector.
Requires Reindex
Number of Company and System Index Shards
indexNumberOfShards="1"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 index-settings-defaults.json shipped with the connector.
Max Result Window
indexMaxResultWindow="10000"Set the maximum number of results to return from a search query. Do not use this property while simultaneously setting index.max_result_window in Additional Index Configurations.
Requires Reindex
Additional Index Configurations
additionalIndexConfigurations=""Set the String values for custom settings for the Liferay index, in JSON or YML format.
Requires Reindex
Additional Type Mappings
additionalTypeMappings=""Set the String values for custom mappings for the LiferayDocumentType, in JSON format.
Requires Reindex
Override Type Mappings
overrideTypeMappings=""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, index-mappings.json) are ignored entirely, so you must include the whole mappings definition in this property, not only the segment you’re modifying.
Log Exceptions Only
logExceptionsOnly=B"true"A Boolean setting that, when true, only logs exceptions from OpenSearch, and does not re-throw them.
Track Total Hits
trackTotalHits=B"true"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.

Capabilities

Product

Contact Us

Connect

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