docs: @SuppressWarnings("nls")
      protected void createIndex(JestClient client, String indexName, String settingsName) throws Exception {
          URL settings = AbstractClientFactory.class.getResource(settingsName);
          String source = IOUtils.toString(settings);
          JestResult response = client.execute(new CreateIndex.Builder(indexName).settings(source).build());
          if (!response.isSucceeded()) {
              // When running in e.g. Wildfly, the Gateway exists as two separate WARs - the API and the
              // runtime Gateway itself.  They both create a registry and thus they both try to initialize
              // the ES index if it doesn't exist.  A race condition could result in both WARs trying to
              // create the index.  So a result of "IndexAlreadyExistsException" should be ignored.
              if (!indexAlreadyExistsException(response)) {
                  throw new Exception("Failed to create index: '" + indexName + "' Reason: " + response.getErrorMessage());
              }
          }
      }