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;
    }
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;
    }
@param Schema $schema
@param string $defaultAnalyzer

@return Mapping