You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/08/23 10:25:06 UTC

[james-project] 13/26: JAMES-3771 Configuration: use opensearch wording

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit ff2a355b958d7f15c4fe6a7bf25ede261bf27884
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Aug 5 10:48:32 2022 +0700

    JAMES-3771 Configuration: use opensearch wording
---
 .../opensearch/OpenSearchConfiguration.java        |  84 +++++-----
 .../opensearch/OpenSearchConfigurationTest.java    | 170 ++++++++++-----------
 .../sample-configuration/jmap.properties           |   2 +-
 ...sticsearch.properties => opensearch.properties} |  66 ++++----
 .../james/configs/elasticsearch.properties         |  48 ------
 .../helm-chart/james/configs/opensearch.properties |  48 ++++++
 .../helm-chart/james/configs/rabbitmq.properties   |   2 +-
 .../sample-configuration/jmap.properties           |   2 +-
 ...sticsearch.properties => opensearch.properties} |  65 ++++----
 .../sample-configuration/rabbitmq.properties       |   2 +-
 .../sample-configuration/elasticsearch.properties  |  83 ----------
 .../sample-configuration/rabbitmq.properties       |   2 +-
 .../sample-configuration/elasticsearch.properties  |  33 ----
 .../modules/mailbox/OpenSearchMailboxModule.java   |  18 +--
 .../mailbox/OpenSearchQuotaSearcherModule.java     |   4 +-
 upgrade-instructions.md                            |   3 +
 16 files changed, 250 insertions(+), 382 deletions(-)

diff --git a/backends-common/opensearch/src/main/java/org/apache/james/backends/opensearch/OpenSearchConfiguration.java b/backends-common/opensearch/src/main/java/org/apache/james/backends/opensearch/OpenSearchConfiguration.java
index cb205e753e..84f92ab2f1 100644
--- a/backends-common/opensearch/src/main/java/org/apache/james/backends/opensearch/OpenSearchConfiguration.java
+++ b/backends-common/opensearch/src/main/java/org/apache/james/backends/opensearch/OpenSearchConfiguration.java
@@ -154,12 +154,12 @@ public class OpenSearchConfiguration {
 
             private SSLTrustStore(String filePath, String password) {
                 Preconditions.checkNotNull(filePath, "%s cannot be null when %s is specified",
-                    ELASTICSEARCH_HTTPS_TRUST_STORE_PATH, ELASTICSEARCH_HTTPS_TRUST_STORE_PASSWORD);
+                    OPENSEARCH_HTTPS_TRUST_STORE_PATH, OPENSEARCH_HTTPS_TRUST_STORE_PASSWORD);
                 Preconditions.checkNotNull(password,
                      "%s cannot be null when %s is specified",
-                    ELASTICSEARCH_HTTPS_TRUST_STORE_PASSWORD, ELASTICSEARCH_HTTPS_TRUST_STORE_PATH);
+                    OPENSEARCH_HTTPS_TRUST_STORE_PASSWORD, OPENSEARCH_HTTPS_TRUST_STORE_PATH);
                 Preconditions.checkArgument(Files.exists(Paths.get(filePath)),
-                    "the file '%s' from property '%s' doesn't exist", filePath, ELASTICSEARCH_HTTPS_TRUST_STORE_PATH);
+                    "the file '%s' from property '%s' doesn't exist", filePath, OPENSEARCH_HTTPS_TRUST_STORE_PATH);
 
                 this.file = new File(filePath);
                 this.password = password.toCharArray();
@@ -407,7 +407,7 @@ public class OpenSearchConfiguration {
 
         public OpenSearchConfiguration build() {
             ImmutableList<Host> hosts = this.hosts.build();
-            Preconditions.checkState(!hosts.isEmpty(), "You need to specify ElasticSearch host");
+            Preconditions.checkState(!hosts.isEmpty(), "You need to specify OpenSearch host");
             return new OpenSearchConfiguration(
                 hosts,
                 nbShards.orElse(DEFAULT_NB_SHARDS),
@@ -429,24 +429,24 @@ public class OpenSearchConfiguration {
         return new Builder();
     }
 
-    public static final String ELASTICSEARCH_HOSTS = "elasticsearch.hosts";
-    public static final String ELASTICSEARCH_MASTER_HOST = "elasticsearch.masterHost";
-    public static final String ELASTICSEARCH_PORT = "elasticsearch.port";
-    public static final String ELASTICSEARCH_HOST_SCHEME = "elasticsearch.hostScheme";
-    public static final String ELASTICSEARCH_HTTPS_SSL_VALIDATION_STRATEGY = "elasticsearch.hostScheme.https.sslValidationStrategy";
-    public static final String ELASTICSEARCH_HTTPS_HOSTNAME_VERIFIER = "elasticsearch.hostScheme.https.hostNameVerifier";
-    public static final String ELASTICSEARCH_HTTPS_TRUST_STORE_PATH = "elasticsearch.hostScheme.https.trustStorePath";
-    public static final String ELASTICSEARCH_HTTPS_TRUST_STORE_PASSWORD = "elasticsearch.hostScheme.https.trustStorePassword";
-    public static final String ELASTICSEARCH_USER = "elasticsearch.user";
-    public static final String ELASTICSEARCH_PASSWORD = "elasticsearch.password";
-    public static final String ELASTICSEARCH_NB_REPLICA = "elasticsearch.nb.replica";
-    public static final String WAIT_FOR_ACTIVE_SHARDS = "elasticsearch.index.waitForActiveShards";
-    public static final String ELASTICSEARCH_NB_SHARDS = "elasticsearch.nb.shards";
-    public static final String ELASTICSEARCH_RETRY_CONNECTION_MIN_DELAY = "elasticsearch.retryConnection.minDelay";
-    public static final String ELASTICSEARCH_RETRY_CONNECTION_MAX_RETRIES = "elasticsearch.retryConnection.maxRetries";
-    public static final String ELASTICSEARCH_MAX_CONNECTIONS = "elasticsearch.max.connections";
-    public static final String ELASTICSEARCH_MAX_CONNECTIONS_PER_HOSTS = "elasticsearch.max.connections.per.hosts";
-    public static final String ELASTICSEARCH_SEARCH_OVERRIDES = "elasticsearch.search.overrides";
+    public static final String OPENSEARCH_HOSTS = "opensearch.hosts";
+    public static final String OPENSEARCH_MASTER_HOST = "opensearch.masterHost";
+    public static final String OPENSEARCH_PORT = "opensearch.port";
+    public static final String OPENSEARCH_HOST_SCHEME = "opensearch.hostScheme";
+    public static final String OPENSEARCH_HTTPS_SSL_VALIDATION_STRATEGY = "opensearch.hostScheme.https.sslValidationStrategy";
+    public static final String OPENSEARCH_HTTPS_HOSTNAME_VERIFIER = "opensearch.hostScheme.https.hostNameVerifier";
+    public static final String OPENSEARCH_HTTPS_TRUST_STORE_PATH = "opensearch.hostScheme.https.trustStorePath";
+    public static final String OPENSEARCH_HTTPS_TRUST_STORE_PASSWORD = "opensearch.hostScheme.https.trustStorePassword";
+    public static final String OPENSEARCH_USER = "opensearch.user";
+    public static final String OPENSEARCH_PASSWORD = "opensearch.password";
+    public static final String OPENSEARCH_NB_REPLICA = "opensearch.nb.replica";
+    public static final String WAIT_FOR_ACTIVE_SHARDS = "opensearch.index.waitForActiveShards";
+    public static final String OPENSEARCH_NB_SHARDS = "opensearch.nb.shards";
+    public static final String OPENSEARCH_RETRY_CONNECTION_MIN_DELAY = "opensearch.retryConnection.minDelay";
+    public static final String OPENSEARCH_RETRY_CONNECTION_MAX_RETRIES = "opensearch.retryConnection.maxRetries";
+    public static final String OPENSEARCH_MAX_CONNECTIONS = "opensearch.max.connections";
+    public static final String OPENSEARCH_MAX_CONNECTIONS_PER_HOSTS = "opensearch.max.connections.per.hosts";
+    public static final String OPENSEARCH_SEARCH_OVERRIDES = "opensearch.search.overrides";
 
     public static final int DEFAULT_CONNECTION_MAX_RETRIES = 7;
     public static final int DEFAULT_CONNECTION_MIN_DELAY = 3000;
@@ -470,25 +470,25 @@ public class OpenSearchConfiguration {
             .hostScheme(getHostScheme(configuration))
             .credential(getCredential(configuration))
             .sslTrustConfiguration(sslTrustConfiguration(configuration))
-            .nbShards(configuration.getInteger(ELASTICSEARCH_NB_SHARDS, DEFAULT_NB_SHARDS))
-            .nbReplica(configuration.getInteger(ELASTICSEARCH_NB_REPLICA, DEFAULT_NB_REPLICA))
+            .nbShards(configuration.getInteger(OPENSEARCH_NB_SHARDS, DEFAULT_NB_SHARDS))
+            .nbReplica(configuration.getInteger(OPENSEARCH_NB_REPLICA, DEFAULT_NB_REPLICA))
             .waitForActiveShards(configuration.getInteger(WAIT_FOR_ACTIVE_SHARDS, DEFAULT_WAIT_FOR_ACTIVE_SHARDS))
-            .minDelay(Optional.ofNullable(configuration.getInteger(ELASTICSEARCH_RETRY_CONNECTION_MIN_DELAY, null)))
-            .maxRetries(Optional.ofNullable(configuration.getInteger(ELASTICSEARCH_RETRY_CONNECTION_MAX_RETRIES, null)))
-            .maxConnections(Optional.ofNullable(configuration.getInteger(ELASTICSEARCH_MAX_CONNECTIONS, null)))
-            .maxConnectionsPerHost(Optional.ofNullable(configuration.getInteger(ELASTICSEARCH_MAX_CONNECTIONS_PER_HOSTS, null)))
-            .withSearchOverrides(Optional.ofNullable(configuration.getStringArray(ELASTICSEARCH_SEARCH_OVERRIDES)).map(ImmutableList::copyOf).orElse(ImmutableList.of()))
+            .minDelay(Optional.ofNullable(configuration.getInteger(OPENSEARCH_RETRY_CONNECTION_MIN_DELAY, null)))
+            .maxRetries(Optional.ofNullable(configuration.getInteger(OPENSEARCH_RETRY_CONNECTION_MAX_RETRIES, null)))
+            .maxConnections(Optional.ofNullable(configuration.getInteger(OPENSEARCH_MAX_CONNECTIONS, null)))
+            .maxConnectionsPerHost(Optional.ofNullable(configuration.getInteger(OPENSEARCH_MAX_CONNECTIONS_PER_HOSTS, null)))
+            .withSearchOverrides(Optional.ofNullable(configuration.getStringArray(OPENSEARCH_SEARCH_OVERRIDES)).map(ImmutableList::copyOf).orElse(ImmutableList.of()))
             .build();
     }
 
     private static SSLConfiguration sslTrustConfiguration(Configuration configuration) {
         SSLValidationStrategy sslStrategy = Optional
-            .ofNullable(configuration.getString(ELASTICSEARCH_HTTPS_SSL_VALIDATION_STRATEGY))
+            .ofNullable(configuration.getString(OPENSEARCH_HTTPS_SSL_VALIDATION_STRATEGY))
             .map(SSLValidationStrategy::from)
             .orElse(SSLValidationStrategy.DEFAULT);
 
         HostNameVerifier hostNameVerifier = Optional
-            .ofNullable(configuration.getString(ELASTICSEARCH_HTTPS_HOSTNAME_VERIFIER))
+            .ofNullable(configuration.getString(OPENSEARCH_HTTPS_HOSTNAME_VERIFIER))
             .map(HostNameVerifier::from)
             .orElse(HostNameVerifier.DEFAULT);
 
@@ -499,8 +499,8 @@ public class OpenSearchConfiguration {
     }
 
     private static Optional<SSLTrustStore> getSSLTrustStore(Configuration configuration) {
-        String trustStorePath = configuration.getString(ELASTICSEARCH_HTTPS_TRUST_STORE_PATH);
-        String trustStorePassword = configuration.getString(ELASTICSEARCH_HTTPS_TRUST_STORE_PASSWORD);
+        String trustStorePath = configuration.getString(OPENSEARCH_HTTPS_TRUST_STORE_PATH);
+        String trustStorePassword = configuration.getString(OPENSEARCH_HTTPS_TRUST_STORE_PASSWORD);
 
         if (trustStorePath == null && trustStorePassword == null) {
             return Optional.empty();
@@ -510,13 +510,13 @@ public class OpenSearchConfiguration {
     }
 
     private static Optional<HostScheme> getHostScheme(Configuration configuration) {
-        return Optional.ofNullable(configuration.getString(ELASTICSEARCH_HOST_SCHEME))
+        return Optional.ofNullable(configuration.getString(OPENSEARCH_HOST_SCHEME))
             .map(HostScheme::of);
     }
 
     private static Optional<Credential> getCredential(Configuration configuration) {
-        String username = configuration.getString(ELASTICSEARCH_USER);
-        String password = configuration.getString(ELASTICSEARCH_PASSWORD);
+        String username = configuration.getString(OPENSEARCH_USER);
+        String password = configuration.getString(OPENSEARCH_PASSWORD);
 
         if (username == null && password == null) {
             return Optional.empty();
@@ -527,10 +527,10 @@ public class OpenSearchConfiguration {
 
     private static ImmutableList<Host> getHosts(Configuration propertiesReader) throws ConfigurationException {
         Optional<String> masterHost = Optional.ofNullable(
-            propertiesReader.getString(ELASTICSEARCH_MASTER_HOST, null));
+            propertiesReader.getString(OPENSEARCH_MASTER_HOST, null));
         Optional<Integer> masterPort = Optional.ofNullable(
-            propertiesReader.getInteger(ELASTICSEARCH_PORT, null));
-        List<String> multiHosts = Arrays.asList(propertiesReader.getStringArray(ELASTICSEARCH_HOSTS));
+            propertiesReader.getInteger(OPENSEARCH_PORT, null));
+        List<String> multiHosts = Arrays.asList(propertiesReader.getStringArray(OPENSEARCH_HOSTS));
 
         validateHostsConfigurationOptions(masterHost, masterPort, multiHosts);
 
@@ -550,13 +550,13 @@ public class OpenSearchConfiguration {
                                                   Optional<Integer> masterPort,
                                                   List<String> multiHosts) throws ConfigurationException {
         if (masterHost.isPresent() != masterPort.isPresent()) {
-            throw new ConfigurationException(ELASTICSEARCH_MASTER_HOST + " and " + ELASTICSEARCH_PORT + " should be specified together");
+            throw new ConfigurationException(OPENSEARCH_MASTER_HOST + " and " + OPENSEARCH_PORT + " should be specified together");
         }
         if (!multiHosts.isEmpty() && masterHost.isPresent()) {
-            throw new ConfigurationException("You should choose between mono host set up and " + ELASTICSEARCH_HOSTS);
+            throw new ConfigurationException("You should choose between mono host set up and " + OPENSEARCH_HOSTS);
         }
         if (multiHosts.isEmpty() && !masterHost.isPresent()) {
-            throw new ConfigurationException("You should specify either (" + ELASTICSEARCH_MASTER_HOST + " and " + ELASTICSEARCH_PORT + ") or " + ELASTICSEARCH_HOSTS);
+            throw new ConfigurationException("You should specify either (" + OPENSEARCH_MASTER_HOST + " and " + OPENSEARCH_PORT + ") or " + OPENSEARCH_HOSTS);
         }
     }
 
diff --git a/backends-common/opensearch/src/test/java/org/apache/james/backends/opensearch/OpenSearchConfigurationTest.java b/backends-common/opensearch/src/test/java/org/apache/james/backends/opensearch/OpenSearchConfigurationTest.java
index 1bc7d546f0..d26140c3ff 100644
--- a/backends-common/opensearch/src/test/java/org/apache/james/backends/opensearch/OpenSearchConfigurationTest.java
+++ b/backends-common/opensearch/src/test/java/org/apache/james/backends/opensearch/OpenSearchConfigurationTest.java
@@ -79,7 +79,7 @@ class OpenSearchConfigurationTest {
         @Test
         void getSSLConfigurationShouldReturnDefaultValueWhenEmpty() throws Exception {
             PropertiesConfiguration configuration = new PropertiesConfiguration();
-            configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+            configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
             assertThat(OpenSearchConfiguration.fromProperties(configuration)
                     .getSslConfiguration())
@@ -89,15 +89,15 @@ class OpenSearchConfigurationTest {
         @Test
         void getSSLConfigurationShouldReturnConfiguredValue() throws Exception {
             PropertiesConfiguration configuration = new PropertiesConfiguration();
-            configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+            configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
             String trustStorePath = "src/test/resources/auth-es/server.jks";
             String trustStorePassword = "secret";
 
-            configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "override");
-            configuration.addProperty("elasticsearch.hostScheme.https.trustStorePath", trustStorePath);
-            configuration.addProperty("elasticsearch.hostScheme.https.trustStorePassword", trustStorePassword);
-            configuration.addProperty("elasticsearch.hostScheme.https.hostNameVerifier", "default");
+            configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "override");
+            configuration.addProperty("opensearch.hostScheme.https.trustStorePath", trustStorePath);
+            configuration.addProperty("opensearch.hostScheme.https.trustStorePassword", trustStorePassword);
+            configuration.addProperty("opensearch.hostScheme.https.hostNameVerifier", "default");
 
             assertThat(OpenSearchConfiguration.fromProperties(configuration)
                     .getSslConfiguration())
@@ -113,9 +113,9 @@ class OpenSearchConfigurationTest {
             @Test
             void getSSLConfigurationShouldAcceptCaseInsensitiveStrategy() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "DEfault");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "DEfault");
 
                 assertThat(OpenSearchConfiguration.fromProperties(configuration)
                         .getSslConfiguration())
@@ -125,9 +125,9 @@ class OpenSearchConfigurationTest {
             @Test
             void fromPropertiesShouldThrowWhenInvalidStrategy() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "invalid");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "invalid");
 
                 assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
                     .isInstanceOf(IllegalArgumentException.class)
@@ -141,9 +141,9 @@ class OpenSearchConfigurationTest {
             @Test
             void getSSLConfigurationShouldReturnConfiguredValue() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.hostNameVerifier", "DEFAULT");
+                configuration.addProperty("opensearch.hostScheme.https.hostNameVerifier", "DEFAULT");
 
                 assertThat(OpenSearchConfiguration.fromProperties(configuration)
                         .getSslConfiguration())
@@ -156,9 +156,9 @@ class OpenSearchConfigurationTest {
             @Test
             void getSSLConfigurationShouldAcceptCaseInsensitiveVerifier() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.hostNameVerifier", "Accept_Any_Hostname");
+                configuration.addProperty("opensearch.hostScheme.https.hostNameVerifier", "Accept_Any_Hostname");
 
                 assertThat(OpenSearchConfiguration.fromProperties(configuration)
                         .getSslConfiguration())
@@ -171,9 +171,9 @@ class OpenSearchConfigurationTest {
             @Test
             void fromPropertiesShouldThrowWhenInvalidVerifier() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.hostNameVerifier", "invalid");
+                configuration.addProperty("opensearch.hostScheme.https.hostNameVerifier", "invalid");
 
                 assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
                     .isInstanceOf(IllegalArgumentException.class)
@@ -187,9 +187,9 @@ class OpenSearchConfigurationTest {
             @Test
             void getSSLConfigurationShouldReturnConfiguredValue() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "default");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "default");
 
                 assertThat(OpenSearchConfiguration.fromProperties(configuration)
                         .getSslConfiguration())
@@ -203,9 +203,9 @@ class OpenSearchConfigurationTest {
             @Test
             void getSSLConfigurationShouldReturnConfiguredValue() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "ignore");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "ignore");
 
                 assertThat(OpenSearchConfiguration.fromProperties(configuration)
                         .getSslConfiguration())
@@ -222,35 +222,35 @@ class OpenSearchConfigurationTest {
             @Test
             void fromPropertiesShouldThrowWhenOnlyTrustStorePathProvided() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "override");
-                configuration.addProperty("elasticsearch.hostScheme.https.trustStorePath", "/home/james/ServerTrustStore.jks");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "override");
+                configuration.addProperty("opensearch.hostScheme.https.trustStorePath", "/home/james/ServerTrustStore.jks");
 
                 assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
                     .isInstanceOf(NullPointerException.class)
-                    .hasMessage("elasticsearch.hostScheme.https.trustStorePassword cannot be null when elasticsearch.hostScheme.https.trustStorePath is specified");
+                    .hasMessage("opensearch.hostScheme.https.trustStorePassword cannot be null when opensearch.hostScheme.https.trustStorePath is specified");
             }
 
             @Test
             void fromPropertiesShouldThrowWhenOnlyTrustStorePasswordProvided() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "override");
-                configuration.addProperty("elasticsearch.hostScheme.https.trustStorePassword", "secret");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "override");
+                configuration.addProperty("opensearch.hostScheme.https.trustStorePassword", "secret");
 
                 assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
                     .isInstanceOf(NullPointerException.class)
-                    .hasMessage("elasticsearch.hostScheme.https.trustStorePath cannot be null when elasticsearch.hostScheme.https.trustStorePassword is specified");
+                    .hasMessage("opensearch.hostScheme.https.trustStorePath cannot be null when opensearch.hostScheme.https.trustStorePassword is specified");
             }
 
             @Test
             void fromPropertiesShouldThrowWhenTrustStoreIsNotProvided() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "override");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "override");
 
                 assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
                     .isInstanceOf(IllegalArgumentException.class)
@@ -260,29 +260,29 @@ class OpenSearchConfigurationTest {
             @Test
             void fromPropertiesShouldThrowWhenTrustStorePathDoesntExist() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "override");
-                configuration.addProperty("elasticsearch.hostScheme.https.trustStorePath", "/home/james/ServerTrustStore.jks");
-                configuration.addProperty("elasticsearch.hostScheme.https.trustStorePassword", "password");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "override");
+                configuration.addProperty("opensearch.hostScheme.https.trustStorePath", "/home/james/ServerTrustStore.jks");
+                configuration.addProperty("opensearch.hostScheme.https.trustStorePassword", "password");
 
                 assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
                     .isInstanceOf(IllegalArgumentException.class)
-                    .hasMessage("the file '/home/james/ServerTrustStore.jks' from property 'elasticsearch.hostScheme.https.trustStorePath' doesn't exist");
+                    .hasMessage("the file '/home/james/ServerTrustStore.jks' from property 'opensearch.hostScheme.https.trustStorePath' doesn't exist");
             }
 
             @Test
             void getSSLConfigurationShouldReturnConfiguredValue() throws Exception {
                 PropertiesConfiguration configuration = new PropertiesConfiguration();
-                configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+                configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
                 String trustStorePath = "src/test/resources/auth-es/server.jks";
                 String trustStorePassword = "secret";
 
-                configuration.addProperty("elasticsearch.hostScheme.https.sslValidationStrategy", "override");
-                configuration.addProperty("elasticsearch.hostScheme.https.trustStorePath", trustStorePath);
-                configuration.addProperty("elasticsearch.hostScheme.https.trustStorePassword", trustStorePassword);
-                configuration.addProperty("elasticsearch.hostScheme.https.hostNameVerifier", "default");
+                configuration.addProperty("opensearch.hostScheme.https.sslValidationStrategy", "override");
+                configuration.addProperty("opensearch.hostScheme.https.trustStorePath", trustStorePath);
+                configuration.addProperty("opensearch.hostScheme.https.trustStorePassword", trustStorePassword);
+                configuration.addProperty("opensearch.hostScheme.https.hostNameVerifier", "default");
 
                 assertThat(OpenSearchConfiguration.fromProperties(configuration)
                         .getSslConfiguration())
@@ -304,8 +304,8 @@ class OpenSearchConfigurationTest {
     void getNbReplicaShouldReturnConfiguredValue() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         int value = 36;
-        configuration.addProperty("elasticsearch.nb.replica", value);
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.nb.replica", value);
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration elasticSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -316,7 +316,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getNbReplicaShouldReturnDefaultValueWhenMissing() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -328,8 +328,8 @@ class OpenSearchConfigurationTest {
     void getWaitForActiveShardsShouldReturnConfiguredValue() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         int value = 36;
-        configuration.addProperty("elasticsearch.index.waitForActiveShards", value);
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.index.waitForActiveShards", value);
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -341,8 +341,8 @@ class OpenSearchConfigurationTest {
     void getWaitForActiveShardsShouldReturnConfiguredValueWhenZero() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         int value = 0;
-        configuration.addProperty("elasticsearch.index.waitForActiveShards", value);
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.index.waitForActiveShards", value);
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -353,7 +353,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getWaitForActiveShardsShouldReturnDefaultValueWhenMissing() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         int expectedValue = 1;
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
@@ -366,8 +366,8 @@ class OpenSearchConfigurationTest {
     void getNbShardsShouldReturnConfiguredValue() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         int value = 36;
-        configuration.addProperty("elasticsearch.nb.shards", value);
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.nb.shards", value);
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -378,7 +378,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getNbShardsShouldReturnDefaultValueWhenMissing() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -390,8 +390,8 @@ class OpenSearchConfigurationTest {
     void getMaxRetriesShouldReturnConfiguredValue() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         int value = 36;
-        configuration.addProperty("elasticsearch.retryConnection.maxRetries", value);
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.retryConnection.maxRetries", value);
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -402,7 +402,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getMaxRetriesShouldReturnDefaultValueWhenMissing() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -414,8 +414,8 @@ class OpenSearchConfigurationTest {
     void getMinDelayShouldReturnConfiguredValue() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         int value = 36;
-        configuration.addProperty("elasticsearch.retryConnection.minDelay", value);
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.retryConnection.minDelay", value);
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -426,7 +426,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getMinDelayShouldReturnDefaultValueWhenMissing() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -438,7 +438,7 @@ class OpenSearchConfigurationTest {
     void getHostsShouldReturnConfiguredHostsWhenNoPort() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         String hostname = "myHost";
-        configuration.addProperty("elasticsearch.hosts", hostname);
+        configuration.addProperty("opensearch.hosts", hostname);
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -453,7 +453,7 @@ class OpenSearchConfigurationTest {
         int port = 2154;
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         configuration.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
-        configuration.addProperty("elasticsearch.hosts", hostname + "," + hostname2 + ":" + port);
+        configuration.addProperty("opensearch.hosts", hostname + "," + hostname2 + ":" + port);
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -467,7 +467,7 @@ class OpenSearchConfigurationTest {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         String hostname = "myHost";
         int port = 2154;
-        configuration.addProperty("elasticsearch.hosts", hostname + ":" + port);
+        configuration.addProperty("opensearch.hosts", hostname + ":" + port);
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -479,9 +479,9 @@ class OpenSearchConfigurationTest {
     void getHostsShouldReturnConfiguredMasterHost() throws ConfigurationException {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
         String hostname = "myHost";
-        configuration.addProperty("elasticsearch.masterHost", hostname);
+        configuration.addProperty("opensearch.masterHost", hostname);
         int port = 9200;
-        configuration.addProperty("elasticsearch.port", port);
+        configuration.addProperty("opensearch.port", port);
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -497,9 +497,9 @@ class OpenSearchConfigurationTest {
                 Optional.empty(),
                 ImmutableList.of()))
             .isInstanceOf(ConfigurationException.class)
-            .hasMessage("You should specify either (" + OpenSearchConfiguration.ELASTICSEARCH_MASTER_HOST +
-                " and " + OpenSearchConfiguration.ELASTICSEARCH_PORT +
-                ") or " + OpenSearchConfiguration.ELASTICSEARCH_HOSTS);
+            .hasMessage("You should specify either (" + OpenSearchConfiguration.OPENSEARCH_MASTER_HOST +
+                " and " + OpenSearchConfiguration.OPENSEARCH_PORT +
+                ") or " + OpenSearchConfiguration.OPENSEARCH_HOSTS);
     }
 
     @Test
@@ -510,7 +510,7 @@ class OpenSearchConfigurationTest {
                 Optional.of(9200),
                 ImmutableList.of("localhost:9200")))
             .isInstanceOf(ConfigurationException.class)
-            .hasMessage("You should choose between mono host set up and " + OpenSearchConfiguration.ELASTICSEARCH_HOSTS);
+            .hasMessage("You should choose between mono host set up and " + OpenSearchConfiguration.OPENSEARCH_HOSTS);
     }
 
     @Test
@@ -521,8 +521,8 @@ class OpenSearchConfigurationTest {
                 Optional.empty(),
                 ImmutableList.of()))
             .isInstanceOf(ConfigurationException.class)
-            .hasMessage(OpenSearchConfiguration.ELASTICSEARCH_MASTER_HOST +
-                " and " + OpenSearchConfiguration.ELASTICSEARCH_PORT + " should be specified together");
+            .hasMessage(OpenSearchConfiguration.OPENSEARCH_MASTER_HOST +
+                " and " + OpenSearchConfiguration.OPENSEARCH_PORT + " should be specified together");
     }
 
     @Test
@@ -533,8 +533,8 @@ class OpenSearchConfigurationTest {
             Optional.of(9200),
             ImmutableList.of()))
         .isInstanceOf(ConfigurationException.class)
-        .hasMessage(OpenSearchConfiguration.ELASTICSEARCH_MASTER_HOST + " and " +
-            OpenSearchConfiguration.ELASTICSEARCH_PORT + " should be specified together");
+        .hasMessage(OpenSearchConfiguration.OPENSEARCH_MASTER_HOST + " and " +
+            OpenSearchConfiguration.OPENSEARCH_PORT + " should be specified together");
     }
 
     @Test
@@ -588,12 +588,12 @@ class OpenSearchConfigurationTest {
     @Test
     void getCredentialShouldReturnConfiguredValue() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         String user = "johndoe";
         String password = "secret";
-        configuration.addProperty("elasticsearch.user", user);
-        configuration.addProperty("elasticsearch.password", password);
+        configuration.addProperty("opensearch.user", user);
+        configuration.addProperty("opensearch.password", password);
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -604,7 +604,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getCredentialShouldReturnEmptyWhenNotConfigured() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -615,9 +615,9 @@ class OpenSearchConfigurationTest {
     @Test
     void fromPropertiesShouldThrowWhenOnlyUsername() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-        configuration.addProperty("elasticsearch.user", "username");
+        configuration.addProperty("opensearch.user", "username");
 
         assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
             .isInstanceOf(NullPointerException.class)
@@ -627,9 +627,9 @@ class OpenSearchConfigurationTest {
     @Test
     void fromPropertiesShouldThrowWhenOnlyPassword() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-        configuration.addProperty("elasticsearch.password", "password");
+        configuration.addProperty("opensearch.password", "password");
 
         assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
             .isInstanceOf(NullPointerException.class)
@@ -639,9 +639,9 @@ class OpenSearchConfigurationTest {
     @Test
     void getHostSchemeShouldReturnConfiguredValue() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-        configuration.addProperty("elasticsearch.hostScheme", "https");
+        configuration.addProperty("opensearch.hostScheme", "https");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -652,9 +652,9 @@ class OpenSearchConfigurationTest {
     @Test
     void getHostSchemeShouldBeCaseInsensitive() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-        configuration.addProperty("elasticsearch.hostScheme", "HTTPs");
+        configuration.addProperty("opensearch.hostScheme", "HTTPs");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -665,7 +665,7 @@ class OpenSearchConfigurationTest {
     @Test
     void getHostSchemeShouldReturnHttpWhenNotConfigured() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
         OpenSearchConfiguration openSearchConfiguration = OpenSearchConfiguration.fromProperties(configuration);
 
@@ -676,9 +676,9 @@ class OpenSearchConfigurationTest {
     @Test
     void fromPropertiesShouldThrowWhenInvalidValue() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.addProperty("elasticsearch.hosts", "127.0.0.1");
+        configuration.addProperty("opensearch.hosts", "127.0.0.1");
 
-        configuration.addProperty("elasticsearch.hostScheme", "invalid-protocol");
+        configuration.addProperty("opensearch.hostScheme", "invalid-protocol");
 
         assertThatThrownBy(() -> OpenSearchConfiguration.fromProperties(configuration))
             .isInstanceOf(IllegalArgumentException.class)
diff --git a/server/apps/cassandra-app/sample-configuration/jmap.properties b/server/apps/cassandra-app/sample-configuration/jmap.properties
index e286ef8266..f794c05ebe 100644
--- a/server/apps/cassandra-app/sample-configuration/jmap.properties
+++ b/server/apps/cassandra-app/sample-configuration/jmap.properties
@@ -19,7 +19,7 @@ tls.secret=james72laBalle
 #
 # jwt.publickeypem.url=file://conf/jwt_publickey
 
-# Should simple Email/query be resolved against a Cassandra projection, or should we resolve them against ElasticSearch?
+# Should simple Email/query be resolved against a Cassandra projection, or should we resolve them against OpenSearch?
 # This enables a higher resilience, but the projection needs to be correctly populated. False by default.
 # view.email.query.enabled=true
 
diff --git a/server/apps/cassandra-app/sample-configuration/elasticsearch.properties b/server/apps/cassandra-app/sample-configuration/opensearch.properties
similarity index 57%
rename from server/apps/cassandra-app/sample-configuration/elasticsearch.properties
rename to server/apps/cassandra-app/sample-configuration/opensearch.properties
index c6e6daca85..ebd02a28ab 100644
--- a/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/cassandra-app/sample-configuration/opensearch.properties
@@ -18,75 +18,65 @@
 #  This template file can be used as example for James Server configuration
 #  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
 
-# Configuration file for ElasticSearch
+# Configuration file for OpenSearch
 
-# Read https://james.apache.org/server/config-elasticsearch.html for further details
+# Read https://james.apache.org/server/config-opensearch.html for further details
 
-elasticsearch.masterHost=elasticsearch
-elasticsearch.port=9200
+opensearch.masterHost=elasticsearch
+opensearch.port=9200
 
 # Optional. Only http or https are accepted, default is http
-# elasticsearch.hostScheme=http
+# opensearch.hostScheme=http
 
 # Optional, default is `default`
 # Choosing the SSL check strategy when using https scheme
 # default: Use the default SSL TrustStore of the system.
 # ignore: Ignore SSL Validation check (not recommended).
 # override: Override the SSL Context to use a custom TrustStore containing ES server's certificate.
-# elasticsearch.hostScheme.https.sslValidationStrategy=default
+# opensearch.hostScheme.https.sslValidationStrategy=default
 
 # Optional. Required when using 'https' scheme and 'override' sslValidationStrategy
-# Configure Elasticsearch rest client to use this trustStore file to recognize nginx's ssl certificate.
+# Configure OpenSearch rest client to use this trustStore file to recognize nginx's ssl certificate.
 # You need to specify both trustStorePath and trustStorePassword
-# elasticsearch.hostScheme.https.trustStorePath=/file/to/trust/keystore.jks
+# opensearch.hostScheme.https.trustStorePath=/file/to/trust/keystore.jks
 
 # Optional. Required when using 'https' scheme and 'override' sslValidationStrategy
-# Configure Elasticsearch rest client to use this trustStore file with the specified password.
+# Configure OpenSearch rest client to use this trustStore file with the specified password.
 # You need to specify both trustStorePath and trustStorePassword
-# elasticsearch.hostScheme.https.trustStorePassword=myJKSPassword
+# opensearch.hostScheme.https.trustStorePassword=myJKSPassword
 
 # Optional. default is `default`
-# Configure Elasticsearch rest client to use host name verifier during SSL handshake
+# Configure OpenSearch rest client to use host name verifier during SSL handshake
 # default: using the default hostname verifier provided by apache http client.
 # accept_any_hostname: accept any hostname (not recommended).
-# elasticsearch.hostScheme.https.hostNameVerifier=default
+# opensearch.hostScheme.https.hostNameVerifier=default
 
 # Optional.
-# Basic auth username to access elasticsearch.
-# Ignore elasticsearch.user and elasticsearch.password to not be using authentication (default behaviour).
+# Basic auth username to access opensearch.
+# Ignore opensearch.user and opensearch.password to not be using authentication (default behaviour).
 # Otherwise, you need to specify both properties.
-# elasticsearch.user=elasticsearch
+# opensearch.user=elasticsearch
 
 # Optional.
-# Basic auth password to access elasticsearch.
-# Ignore elasticsearch.user and elasticsearch.password to not be using authentication (default behaviour).
+# Basic auth password to access opensearch.
+# Ignore opensearch.user and opensearch.password to not be using authentication (default behaviour).
 # Otherwise, you need to specify both properties.
-# elasticsearch.password=secret
+# opensearch.password=secret
 
 # You can alternatively provide a list of hosts following this format :
-# elasticsearch.hosts=host1:9200,host2:9200
-# elasticsearch.clusterName=cluster
+# opensearch.hosts=host1:9200,host2:9200
+# opensearch.clusterName=cluster
 
-elasticsearch.nb.shards=5
-elasticsearch.nb.replica=1
-elasticsearch.index.waitForActiveShards=1
-elasticsearch.retryConnection.maxRetries=7
-elasticsearch.retryConnection.minDelay=3000
+opensearch.nb.shards=5
+opensearch.nb.replica=1
+opensearch.index.waitForActiveShards=1
+opensearch.retryConnection.maxRetries=7
+opensearch.retryConnection.minDelay=3000
 # Index or not attachments (default value: true)
-elasticsearch.indexAttachments=true
-
-# Reports for metrics into ElasticSearch
-# Defaults to elasticsearch.masterHost : on which server to publish metrics
-# WARNING: Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
-# This component is furthermore unmaintained an use is discouraged.#elasticsearch.http.host=elasticsearch
-# elasticsearch.http.host=elasticsearch
-# elasticsearch.http.port=9200
-# elasticsearch.metrics.reports.enabled=true
-# elasticsearch.metrics.reports.period=30
-# elasticsearch.metrics.reports.index=james-metrics
+opensearch.indexAttachments=true
 
 # Search overrides allow resolution of predefined search queries against alternative sources of data
-# and allow bypassing ElasticSearch. This is useful to handle most resynchronisation queries that
+# and allow bypassing opensearch. This is useful to handle most resynchronisation queries that
 # are simple enough to be resolved against Cassandra.
 #
 # Possible values are:
@@ -104,4 +94,4 @@ elasticsearch.indexAttachments=true
 #
 # Please note that custom overrides can be defined here.
 #
-# elasticsearch.search.overrides=org.apache.james.mailbox.cassandra.search.AllSearchOverride,org.apache.james.mailbox.cassandra.search.DeletedSearchOverride, org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.UidSearchOverride,org.apache.james.mailbox.cassandra.search.UnseenSearchOverride
+# opensearch.search.overrides=org.apache.james.mailbox.cassandra.search.AllSearchOverride,org.apache.james.mailbox.cassandra.search.DeletedSearchOverride, org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.UidSearchOverride,org.apache.james.mailbox.cassandra.search.UnseenSearchOverride
diff --git a/server/apps/distributed-app/helm-chart/james/configs/elasticsearch.properties b/server/apps/distributed-app/helm-chart/james/configs/elasticsearch.properties
deleted file mode 100644
index d34e22e1ad..0000000000
--- a/server/apps/distributed-app/helm-chart/james/configs/elasticsearch.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-
-#  This template file can be used as example for James Server configuration
-#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-
-# Configuration file for ElasticSearch
-
-# http://james.apache.org/server/config-elasticsearch.html
-
-## standalone
-# elasticsearch.masterHost=james-elastic
-# elasticsearch.port=9300
-
-## cluster
-elasticsearch.hosts=${env:JAMES_ES_NODES_URLS}
-elasticsearch.clusterName=${env:JAMES_ES_CLUSTER_NAME}
-
-elasticsearch.user=${env:JAMES_ES_USER}
-elasticsearch.password=${env:JAMES_ES_PASSWORD}
-elasticsearch.hostScheme=${env:JAMES_ES_HOST_SCHEME}
-
-elasticsearch.hostScheme.https.sslValidationStrategy=${env:JAMES_ES_SSL_VALIDATION_STRATEGY}
-elasticsearch.hostScheme.https.hostNameVerifier=${env:JAMES_ES_HOST_NAME_VERIFIER}
-
-elasticsearch.nb.shards=${env:JAMES_ES_NB_SHARDS}
-elasticsearch.nb.replica=${env:JAMES_ES_NB_REPLICA}
-elasticsearch.retryConnection.maxRetries=7
-elasticsearch.retryConnection.minDelay=3000
-
-elasticsearch.alias.read.mailbox.name=${env:JAMES_ES_MAILBOX_READ_ALIAS}
-elasticsearch.alias.write.mailbox.name=${env:JAMES_ES_MAILBOX_READ_WRITE}
-
-elasticsearch.index.mailbox.name=${env:JAMES_ES_MAILBOX_INDEX}
\ No newline at end of file
diff --git a/server/apps/distributed-app/helm-chart/james/configs/opensearch.properties b/server/apps/distributed-app/helm-chart/james/configs/opensearch.properties
new file mode 100644
index 0000000000..939ee2763a
--- /dev/null
+++ b/server/apps/distributed-app/helm-chart/james/configs/opensearch.properties
@@ -0,0 +1,48 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+#  This template file can be used as example for James Server configuration
+#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+
+# Configuration file for OpenSearch
+
+# http://james.apache.org/server/config-opensearch.html
+
+## standalone
+# opensearch.masterHost=james-elastic
+# opensearch.port=9300
+
+## cluster
+opensearch.hosts=${env:JAMES_ES_NODES_URLS}
+opensearch.clusterName=${env:JAMES_ES_CLUSTER_NAME}
+
+opensearch.user=${env:JAMES_ES_USER}
+opensearch.password=${env:JAMES_ES_PASSWORD}
+opensearch.hostScheme=${env:JAMES_ES_HOST_SCHEME}
+
+opensearch.hostScheme.https.sslValidationStrategy=${env:JAMES_ES_SSL_VALIDATION_STRATEGY}
+opensearch.hostScheme.https.hostNameVerifier=${env:JAMES_ES_HOST_NAME_VERIFIER}
+
+opensearch.nb.shards=${env:JAMES_ES_NB_SHARDS}
+opensearch.nb.replica=${env:JAMES_ES_NB_REPLICA}
+opensearch.retryConnection.maxRetries=7
+opensearch.retryConnection.minDelay=3000
+
+opensearch.alias.read.mailbox.name=${env:JAMES_ES_MAILBOX_READ_ALIAS}
+opensearch.alias.write.mailbox.name=${env:JAMES_ES_MAILBOX_READ_WRITE}
+
+opensearch.index.mailbox.name=${env:JAMES_ES_MAILBOX_INDEX}
\ No newline at end of file
diff --git a/server/apps/distributed-app/helm-chart/james/configs/rabbitmq.properties b/server/apps/distributed-app/helm-chart/james/configs/rabbitmq.properties
index 573c87b3b4..550dad34bc 100644
--- a/server/apps/distributed-app/helm-chart/james/configs/rabbitmq.properties
+++ b/server/apps/distributed-app/helm-chart/james/configs/rabbitmq.properties
@@ -21,7 +21,7 @@ mailqueue.view.bucketCount=${env:JAMES_BUCKET_COUNT}
 mailqueue.view.updateBrowseStartPace=1000
 # Enables or disables the gauge metric on the mail queue size
 # Computing the size of the mail queue is currently implemented on top of browse operation and thus have a linear complexity
-# Metrics get exported periodically as configured in elasticsearch.properties, thus getSize is also called periodically
+# Metrics get exported periodically as configured in opensearch.properties, thus getSize is also called periodically
 # Choose to disable it when the mail queue size is getting too big
 # Note that this is as well a temporary workaround until we get 'getSize' method better optimized
 # Optional, default true
diff --git a/server/apps/distributed-app/sample-configuration/jmap.properties b/server/apps/distributed-app/sample-configuration/jmap.properties
index e286ef8266..f794c05ebe 100644
--- a/server/apps/distributed-app/sample-configuration/jmap.properties
+++ b/server/apps/distributed-app/sample-configuration/jmap.properties
@@ -19,7 +19,7 @@ tls.secret=james72laBalle
 #
 # jwt.publickeypem.url=file://conf/jwt_publickey
 
-# Should simple Email/query be resolved against a Cassandra projection, or should we resolve them against ElasticSearch?
+# Should simple Email/query be resolved against a Cassandra projection, or should we resolve them against OpenSearch?
 # This enables a higher resilience, but the projection needs to be correctly populated. False by default.
 # view.email.query.enabled=true
 
diff --git a/server/apps/distributed-app/sample-configuration/elasticsearch.properties b/server/apps/distributed-app/sample-configuration/opensearch.properties
similarity index 57%
rename from server/apps/distributed-app/sample-configuration/elasticsearch.properties
rename to server/apps/distributed-app/sample-configuration/opensearch.properties
index ee9221cd3d..87011f9f5c 100644
--- a/server/apps/distributed-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/distributed-app/sample-configuration/opensearch.properties
@@ -18,73 +18,64 @@
 #  This template file can be used as example for James Server configuration
 #  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
 
-# Configuration file for ElasticSearch
-# Read https://james.apache.org/server/config-elasticsearch.html for further details
+# Configuration file for OpenSearch
+# Read https://james.apache.org/server/config-opensearch.html for further details
 
-elasticsearch.masterHost=elasticsearch
-elasticsearch.port=9200
+opensearch.masterHost=opensearch
+opensearch.port=9200
 
 # Optional. Only http or https are accepted, default is http
-# elasticsearch.hostScheme=http
+# opensearch.hostScheme=http
 
 # Optional, default is `default`
 # Choosing the SSL check strategy when using https scheme
 # default: Use the default SSL TrustStore of the system.
 # ignore: Ignore SSL Validation check (not recommended).
 # override: Override the SSL Context to use a custom TrustStore containing ES server's certificate.
-# elasticsearch.hostScheme.https.sslValidationStrategy=default
+# opensearch.hostScheme.https.sslValidationStrategy=default
 
 # Optional. Required when using 'https' scheme and 'override' sslValidationStrategy
-# Configure Elasticsearch rest client to use this trustStore file to recognize nginx's ssl certificate.
+# Configure OpenSearch rest client to use this trustStore file to recognize nginx's ssl certificate.
 # You need to specify both trustStorePath and trustStorePassword
-# elasticsearch.hostScheme.https.trustStorePath=/file/to/trust/keystore.jks
+# opensearch.hostScheme.https.trustStorePath=/file/to/trust/keystore.jks
 
 # Optional. Required when using 'https' scheme and 'override' sslValidationStrategy
-# Configure Elasticsearch rest client to use this trustStore file with the specified password.
+# Configure OpenSearch rest client to use this trustStore file with the specified password.
 # You need to specify both trustStorePath and trustStorePassword
-# elasticsearch.hostScheme.https.trustStorePassword=myJKSPassword
+# opensearch.hostScheme.https.trustStorePassword=myJKSPassword
 
 # Optional. default is `default`
-# Configure Elasticsearch rest client to use host name verifier during SSL handshake
+# Configure OpenSearch rest client to use host name verifier during SSL handshake
 # default: using the default hostname verifier provided by apache http client.
 # accept_any_hostname: accept any host (not recommended).
-# elasticsearch.hostScheme.https.hostNameVerifier=default
+# opensearch.hostScheme.https.hostNameVerifier=default
 
 # Optional.
-# Basic auth username to access elasticsearch.
-# Ignore elasticsearch.user and elasticsearch.password to not be using authentication (default behaviour).
+# Basic auth username to access opensearch.
+# Ignore opensearch.user and opensearch.password to not be using authentication (default behaviour).
 # Otherwise, you need to specify both properties.
-# elasticsearch.user=elasticsearch
+# opensearch.user=elasticsearch
 
 # Optional.
-# Basic auth password to access elasticsearch.
-# Ignore elasticsearch.user and elasticsearch.password to not be using authentication (default behaviour).
+# Basic auth password to access opensearch.
+# Ignore opensearch.user and opensearch.password to not be using authentication (default behaviour).
 # Otherwise, you need to specify both properties.
-# elasticsearch.password=secret
+# opensearch.password=secret
 
 # You can alternatively provide a list of hosts following this format :
-# elasticsearch.hosts=host1:9200,host2:9200
-# elasticsearch.clusterName=cluster
+# opensearch.hosts=host1:9200,host2:9200
+# opensearch.clusterName=cluster
 
-elasticsearch.nb.shards=5
-elasticsearch.nb.replica=1
-elasticsearch.index.waitForActiveShards=1
-elasticsearch.retryConnection.maxRetries=7
-elasticsearch.retryConnection.minDelay=3000
+opensearch.nb.shards=5
+opensearch.nb.replica=1
+opensearch.index.waitForActiveShards=1
+opensearch.retryConnection.maxRetries=7
+opensearch.retryConnection.minDelay=3000
 # Index or not attachments (default value: true)
-elasticsearch.indexAttachments=true
-
-# Reports for metrics into ElasticSearch
-# Defaults to elasticsearch.masterHost : on which server to publish metrics
-# WARNING: Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
-# This component is furthermore unmaintained an use is discouraged.#elasticsearch.http.host=elasticsearch
-#elasticsearch.http.port=9200
-#elasticsearch.metrics.reports.enabled=true
-#elasticsearch.metrics.reports.period=30
-#elasticsearch.metrics.reports.index=james-metrics
+opensearch.indexAttachments=true
 
 # Search overrides allow resolution of predefined search queries against alternative sources of data
-# and allow bypassing ElasticSearch. This is useful to handle most resynchronisation queries that
+# and allow bypassing opensearch. This is useful to handle most resynchronisation queries that
 # are simple enough to be resolved against Cassandra.
 #
 # Possible values are:
@@ -102,4 +93,4 @@ elasticsearch.indexAttachments=true
 #
 # Please note that custom overrides can be defined here.
 #
-# elasticsearch.search.overrides=org.apache.james.mailbox.cassandra.search.AllSearchOverride,org.apache.james.mailbox.cassandra.search.DeletedSearchOverride, org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.UidSearchOverride,org.apache.james.mailbox.cassandra.search.UnseenSearchOverride
+# opensearch.search.overrides=org.apache.james.mailbox.cassandra.search.AllSearchOverride,org.apache.james.mailbox.cassandra.search.DeletedSearchOverride, org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.UidSearchOverride,org.apache.james.mailbox.cassandra.search.UnseenSearchOverride
diff --git a/server/apps/distributed-app/sample-configuration/rabbitmq.properties b/server/apps/distributed-app/sample-configuration/rabbitmq.properties
index 5694d43cbb..25fad92687 100644
--- a/server/apps/distributed-app/sample-configuration/rabbitmq.properties
+++ b/server/apps/distributed-app/sample-configuration/rabbitmq.properties
@@ -71,7 +71,7 @@ mailqueue.view.updateBrowseStartPace=1000
 
 # Enables or disables the gauge metric on the mail queue size
 # Computing the size of the mail queue is currently implemented on top of browse operation and thus have a linear complexity
-# Metrics get exported periodically as configured in elasticsearch.properties, thus getSize is also called periodically
+# Metrics get exported periodically as configured in opensearch.properties, thus getSize is also called periodically
 # Choose to disable it when the mail queue size is getting too big
 # Note that this is as well a temporary workaround until we get 'getSize' method better optimized
 # Optional, default false
diff --git a/server/apps/distributed-pop3-app/sample-configuration/elasticsearch.properties b/server/apps/distributed-pop3-app/sample-configuration/elasticsearch.properties
deleted file mode 100644
index 16ea216d9b..0000000000
--- a/server/apps/distributed-pop3-app/sample-configuration/elasticsearch.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-
-#  This template file can be used as example for James Server configuration
-#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-
-# Configuration file for ElasticSearch
-# Read https://james.apache.org/server/config-elasticsearch.html for further details
-
-elasticsearch.masterHost=elasticsearch
-elasticsearch.port=9200
-
-# Optional. Only http or https are accepted, default is http
-# elasticsearch.hostScheme=http
-
-# Optional, default is `default`
-# Choosing the SSL check strategy when using https scheme
-# default: Use the default SSL TrustStore of the system.
-# ignore: Ignore SSL Validation check (not recommended).
-# override: Override the SSL Context to use a custom TrustStore containing ES server's certificate.
-# elasticsearch.hostScheme.https.sslValidationStrategy=default
-
-# Optional. Required when using 'https' scheme and 'override' sslValidationStrategy
-# Configure Elasticsearch rest client to use this trustStore file to recognize nginx's ssl certificate.
-# You need to specify both trustStorePath and trustStorePassword
-# elasticsearch.hostScheme.https.trustStorePath=/file/to/trust/keystore.jks
-
-# Optional. Required when using 'https' scheme and 'override' sslValidationStrategy
-# Configure Elasticsearch rest client to use this trustStore file with the specified password.
-# You need to specify both trustStorePath and trustStorePassword
-# elasticsearch.hostScheme.https.trustStorePassword=myJKSPassword
-
-# Optional. default is `default`
-# Configure Elasticsearch rest client to use host name verifier during SSL handshake
-# default: using the default hostname verifier provided by apache http client.
-# accept_any_hostname: accept any host (not recommended).
-# elasticsearch.hostScheme.https.hostNameVerifier=default
-
-# Optional.
-# Basic auth username to access elasticsearch.
-# Ignore elasticsearch.user and elasticsearch.password to not be using authentication (default behaviour).
-# Otherwise, you need to specify both properties.
-# elasticsearch.user=elasticsearch
-
-# Optional.
-# Basic auth password to access elasticsearch.
-# Ignore elasticsearch.user and elasticsearch.password to not be using authentication (default behaviour).
-# Otherwise, you need to specify both properties.
-# elasticsearch.password=secret
-
-# You can alternatively provide a list of hosts following this format :
-# elasticsearch.hosts=host1:9200,host2:9200
-# elasticsearch.clusterName=cluster
-
-elasticsearch.nb.shards=5
-elasticsearch.nb.replica=1
-elasticsearch.index.waitForActiveShards=1
-elasticsearch.retryConnection.maxRetries=7
-elasticsearch.retryConnection.minDelay=3000
-# Index or not attachments (default value: true)
-elasticsearch.indexAttachments=true
-
-# Reports for metrics into ElasticSearch
-# Defaults to elasticsearch.masterHost : on which server to publish metrics
-elasticsearch.http.host=elasticsearch
-elasticsearch.http.port=9200
-elasticsearch.metrics.reports.enabled=true
-elasticsearch.metrics.reports.period=30
-elasticsearch.metrics.reports.index=james-metrics
diff --git a/server/apps/distributed-pop3-app/sample-configuration/rabbitmq.properties b/server/apps/distributed-pop3-app/sample-configuration/rabbitmq.properties
index d891444948..8997445c3f 100644
--- a/server/apps/distributed-pop3-app/sample-configuration/rabbitmq.properties
+++ b/server/apps/distributed-pop3-app/sample-configuration/rabbitmq.properties
@@ -71,7 +71,7 @@ mailqueue.view.updateBrowseStartPace=1000
 
 # Enables or disables the gauge metric on the mail queue size
 # Computing the size of the mail queue is currently implemented on top of browse operation and thus have a linear complexity
-# Metrics get exported periodically as configured in elasticsearch.properties, thus getSize is also called periodically
+# Metrics get exported periodically as configured in opensearch.properties, thus getSize is also called periodically
 # Choose to disable it when the mail queue size is getting too big
 # Note that this is as well a temporary workaround until we get 'getSize' method better optimized
 # Optional, default false
diff --git a/server/apps/memory-app/sample-configuration/elasticsearch.properties b/server/apps/memory-app/sample-configuration/elasticsearch.properties
deleted file mode 100644
index 9dd6cabe07..0000000000
--- a/server/apps/memory-app/sample-configuration/elasticsearch.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-
-#  This template file can be used as example for James Server configuration
-#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-# Read https://james.apache.org/server/config-elasticsearch.html for further details (metrics only)
-
-
-# Configuration file for ElasticSearch
-
-# Reports for metrics into ElasticSearch
-# Defaults to elasticsearch.masterHost : on which server to publish metrics
-# WARNING: Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
-# This component is furthermore unmaintained an use is discouraged.#elasticsearch.http.host=elasticsearch
-# elasticsearch.http.host=elasticsearch
-# elasticsearch.http.port=9200
-# elasticsearch.metrics.reports.enabled=true
-# elasticsearch.metrics.reports.period=30
-# elasticsearch.metrics.reports.index=james-metrics
diff --git a/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchMailboxModule.java b/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchMailboxModule.java
index da6994b9b2..6f7e90bd04 100644
--- a/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchMailboxModule.java
+++ b/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchMailboxModule.java
@@ -95,7 +95,7 @@ public class OpenSearchMailboxModule extends AbstractModule {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(OpenSearchMailboxModule.class);
 
-    public static final String ELASTICSEARCH_CONFIGURATION_NAME = "elasticsearch";
+    public static final String OPENSEARCH_CONFIGURATION_NAME = "opensearch";
 
     @Override
     protected void configure() {
@@ -129,7 +129,7 @@ public class OpenSearchMailboxModule extends AbstractModule {
     @Provides
     @Singleton
     @Named(MailboxOpenSearchConstants.InjectionNames.MAILBOX)
-    private OpenSearchIndexer createMailboxElasticSearchIndexer(ReactorOpenSearchClient client,
+    private OpenSearchIndexer createMailboxOpenSearchIndexer(ReactorOpenSearchClient client,
                                                                 OpenSearchMailboxConfiguration configuration) {
         return new OpenSearchIndexer(
             client,
@@ -138,7 +138,7 @@ public class OpenSearchMailboxModule extends AbstractModule {
 
     @Provides
     @Singleton
-    private OpenSearchSearcher createMailboxElasticSearchSearcher(ReactorOpenSearchClient client,
+    private OpenSearchSearcher createMailboxOpenSearchSearcher(ReactorOpenSearchClient client,
                                                                   QueryConverter queryConverter,
                                                                   OpenSearchMailboxConfiguration configuration,
                                                                   RoutingKey.Factory<MailboxId> routingKeyFactory) {
@@ -151,12 +151,12 @@ public class OpenSearchMailboxModule extends AbstractModule {
 
     @Provides
     @Singleton
-    private OpenSearchConfiguration getElasticSearchConfiguration(PropertiesProvider propertiesProvider) throws ConfigurationException {
+    private OpenSearchConfiguration getOpenSearchConfiguration(PropertiesProvider propertiesProvider) throws ConfigurationException {
         try {
-            Configuration configuration = propertiesProvider.getConfiguration(ELASTICSEARCH_CONFIGURATION_NAME);
+            Configuration configuration = propertiesProvider.getConfiguration(OPENSEARCH_CONFIGURATION_NAME);
             return OpenSearchConfiguration.fromProperties(configuration);
         } catch (FileNotFoundException e) {
-            LOGGER.warn("Could not find " + ELASTICSEARCH_CONFIGURATION_NAME + " configuration file. Using {}:{} as contact point",
+            LOGGER.warn("Could not find " + OPENSEARCH_CONFIGURATION_NAME + " configuration file. Using {}:{} as contact point",
                 OpenSearchConfiguration.LOCALHOST, OpenSearchConfiguration.DEFAULT_PORT);
             return OpenSearchConfiguration.DEFAULT_CONFIGURATION;
         }
@@ -164,12 +164,12 @@ public class OpenSearchMailboxModule extends AbstractModule {
 
     @Provides
     @Singleton
-    private OpenSearchMailboxConfiguration getElasticSearchMailboxConfiguration(PropertiesProvider propertiesProvider) throws ConfigurationException {
+    private OpenSearchMailboxConfiguration getOpenSearchMailboxConfiguration(PropertiesProvider propertiesProvider) throws ConfigurationException {
         try {
-            Configuration configuration = propertiesProvider.getConfiguration(ELASTICSEARCH_CONFIGURATION_NAME);
+            Configuration configuration = propertiesProvider.getConfiguration(OPENSEARCH_CONFIGURATION_NAME);
             return OpenSearchMailboxConfiguration.fromProperties(configuration);
         } catch (FileNotFoundException e) {
-            LOGGER.warn("Could not find " + ELASTICSEARCH_CONFIGURATION_NAME + " configuration file. Providing a default ElasticSearchMailboxConfiguration");
+            LOGGER.warn("Could not find " + OPENSEARCH_CONFIGURATION_NAME + " configuration file. Providing a default OPENSearchMailboxConfiguration");
             return OpenSearchMailboxConfiguration.DEFAULT_CONFIGURATION;
         }
     }
diff --git a/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchQuotaSearcherModule.java b/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchQuotaSearcherModule.java
index 90305c4beb..adf5950743 100644
--- a/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchQuotaSearcherModule.java
+++ b/server/container/guice/opensearch/src/main/java/org/apache/james/modules/mailbox/OpenSearchQuotaSearcherModule.java
@@ -19,7 +19,7 @@
 
 package org.apache.james.modules.mailbox;
 
-import static org.apache.james.modules.mailbox.OpenSearchMailboxModule.ELASTICSEARCH_CONFIGURATION_NAME;
+import static org.apache.james.modules.mailbox.OpenSearchMailboxModule.OPENSEARCH_CONFIGURATION_NAME;
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -98,7 +98,7 @@ public class OpenSearchQuotaSearcherModule extends AbstractModule {
     @Singleton
     private OpenSearchQuotaConfiguration getOpenSearchQuotaConfiguration(PropertiesProvider propertiesProvider) throws ConfigurationException {
         try {
-            Configuration configuration = propertiesProvider.getConfiguration(ELASTICSEARCH_CONFIGURATION_NAME);
+            Configuration configuration = propertiesProvider.getConfiguration(OPENSEARCH_CONFIGURATION_NAME);
             return OpenSearchQuotaConfiguration.fromProperties(configuration);
         } catch (FileNotFoundException e) {
             LOGGER.warn("Could not find " + OPENSEARCH_CONFIGURATION_NAME + " configuration file. Providing a default OpenSearchQuotaConfiguration");
diff --git a/upgrade-instructions.md b/upgrade-instructions.md
index cceef7ae3b..616c509182 100644
--- a/upgrade-instructions.md
+++ b/upgrade-instructions.md
@@ -38,6 +38,9 @@ Opensearch v2.1 cluster and [reindex data](https://github.com/apache/james-proje
 Keep in mind as well that the group listeners related to ElasticSearch changed names.
 You would need to manually delete the bindings from the event queues in RabbitMQ before restarting James.
 
+Configuration file was relocated to `opensearch.properties` and properties are now prefixed by `opensearch.` rather than
+`elasticsearch.`.
+
 ### Migration to Cassandra driver 4
 
 Date: 07/06/2022


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org