Elastica\Type\AbstractType::create PHP Метод

create() публичный Метод

Creates the index and sets the mapping for this type.
public create ( boolean $recreate = false )
$recreate boolean OPTIONAL Recreates the index if true (default = false)
    public function create($recreate = false)
    {
        $this->getIndex()->create($this->_indexParams, $recreate);
        $mapping = new Mapping($this->getType());
        $mapping->setProperties($this->_mapping);
        $mapping->setSource(['enabled' => $this->_source]);
        $mapping->send();
    }