code: public Optional<Map<String, ?>> getMappings(String index, String
              type) {
          try {
              return Optional
                      .of(getMappingsResponse(index).get(index).get(type)
                              .getSourceAsMap());
          } catch (Exception e) {
              return JMExceptionManager.handleExceptionAndReturnEmptyOptional
                      (log, e, "getMappings", index, type);
          }
      }
docs: Gets mappings.
  
  @param index the index
  @param type  the type
  @return the mappings