code: private void initTemplates() throws Exception {
          if (templates != null && templates.length > 0) {
              for (String template : templates) {
                  Assert.hasText(template, "Can not read template in ["
                          + template
                          + "]. Check that templates is not empty.");
                  createTemplate(client.getLowLevelClient(), classpathRoot, template, forceTemplate);
              }
          }
      }
docs: Init templates if needed.
  <p>
  Note that you can force to recreate template using
  {@link #setForceTemplate(boolean)}