Alfresco Repository provides configuration properties for the Elasticsearch Search subsystem that defines the connection to the external Elasticsearch server, for more see Configure Subsystem in Repository.
Additional property values can be included in the global configuration file alfresco-global.properties
| Property | Description |
|---|---|
| elasticsearch.host | Name of the Elasticsearch server. The default value is localhost. |
| elasticsearch.port | Port of the Elasticsearch server. The default value is 9200. |
| elasticsearch.baseUrl | Context path for the Elasticsearch server endpoint. |
| elasticsearch.secureComms | Set secure communications for requests to the Elasticsearch server. When you set this value to https, adding the Elasticsearch Trusted CA certificate to Alfresco Repository Truststore is required. Once this done communication with the Elasticsearch server is managed with the HTTPS protocol. When you set this value to none, communication to the Elasticsearch server is managed with the HTTP protocol. |
| elasticsearch.ssl.host.name.verification | When using the HTTPS protocol, this property controls the Elasticsearch server TLS certificate and includes a CN with the real DNS hostname. To use the property set the value to be true, to ignore the property set the value to false. The default value is false. |
| elasticsearch.user | Username for Elasticsearch server. It is left empty by default. |
| elasticsearch.password | Password for Elasticsearch server. It is left empty by default. |
| elasticsearch.max.total.connections | Maximum number of HTTP(s) connections allowed for the Elasticsearch server. The default value is 30. |
| elasticsearch.max.host.connections | Maximum number of HTTP(s) connections allowed for an Elasticsearch endpoint. The default value is 30. |
| elasticsearch.http.socket.timeout | Maximum timeout in milliseconds to wait for a socket response. The default value is 30000. |
| elasticsearch.http.connection.timeout | Maximum timeout in milliseconds to wait for a socket connection. The default value is 1000. |
| elasticsearch.indexName | Name of the index to be used in the Elasticsearch server. The default value is alfresco. |
| elasticsearch.createIndexIfNotExists | An Index is created in the Elasticsearch server when this value is set to true. The default value is false. |
| elasticsearch.retryPeriodSeconds | Number of seconds to wait before retrying the Elasticsearch index initialization. The default value is 10. |
| elasticsearch.retryAttempts | Number of attempts to try Elasticsearch index initialization. The default value is 3. |
| elasticsearch.lockRetryPeriodSeconds | Number of seconds to wait before retrying the Elasticsearch index initialization in lock mode. The default value is 10. |
| elasticsearch.query.includeGroupsForRoleAdmin | Include groups for Role Admin in permission filters when this value is set to true. The default value is false. |
| elasticsearch.index.mapping.total_fields.limit | Mapping limit settings: The maximum number of fields in Alfresco index. When working on deployments including a large collection of custom content models, this value may be increased, but it is not recommended. The default value is 7500. |
| elasticsearch.index.max_result_window | Maximum number of results that can be returned by a single query. The default value is 10000. |
| elasticsearch.io.threadCount | Number of I/O Dispatcher threads to be used by the underlying Elasticsearch REST client. This number must be greater than zero, otherwise the default value will be used. The default value is java.lang.Runtime.getRuntime().availableProcessors().Added in Content Services 23.1. |
Some of the properties above can be edited in the Search Admin Console, but values will be applied only to the Alfresco Repository instance. To update values for the Elasticsearch connector update its property file manually. Note: It is important that the Elasticsearch connector and repository configuration match, otherwise the search functionality will be impaired.
Additionally, these properties can be set as environment variables in Alfresco Repository Docker Image when using Docker Compose. In the following sample, elasticsearch.host and elasticsearch.createIndexIfNotExists override the default values.
alfresco:
image: quay.io/alfresco/alfresco-content-repository:23.1.0
environment:
JAVA_OPTS: "
-Dindex.subsystem.name=elasticsearch
-Delasticsearch.host=elasticsearch
-Delasticsearch.createIndexIfNotExists=true
"