code: private void initMappings() throws Exception {
          checkClient();
          // We extract indexes and mappings to manage from mappings definition
          if (mappings != null && mappings.length > 0) {
              Map<String, Collection<String>> indices = getIndexMappings(mappings);
  
              // Let's initialize indexes and mappings if needed
              for (String index : indices.keySet()) {
                  createIndex(client.getLowLevelClient(), classpathRoot, index, forceMapping);
                  if (mergeSettings) {
                      updateSettings(client.getLowLevelClient(), classpathRoot, index);
                  }
  
                  createMapping(client, classpathRoot, index, mergeMapping);
              }
          }
      }
docs: Init mapping if needed.
  <p>Note that you can force to reinit mapping using {@link #setForceMapping(boolean)}