code: public function create(Schema $schema, $defaultAnalyzer = null)
      {
          $this->defaultAnalyzer = $defaultAnalyzer;
          $rootObject = new \stdClass();
          $rootObject->dynamic_templates = [];
          $mapping = new Mapping(null, $this->mapSchema($schema, $rootObject));
          foreach (get_object_vars($rootObject) as $k => $v) {
              if (!empty($v)) {
                  $mapping->setParam($k, $v);
              }
          }
          return $mapping;
      }
docs: @param Schema $schema
  @param string $defaultAnalyzer
  
  @return Mapping