public mapStatement ( array $mappings ) : array | ||
$mappings | array | |
return | array |
public function mapStatement(array $mappings)
{
return $this->elastic->indices()->putMapping($this->setStatementIndex($mappings));
}
/** * Execute the blueprint against the database. * * @param Connection $connection * @param Grammar $grammar * * @return array */ public function build(Connection $connection, Grammar $grammar) { $statement = ['index' => $this->index, 'type' => $this->type, 'body' => [$this->type => ['_source' => ['enabled' => true], 'properties' => $this->toDSL($grammar)]]]; return $connection->mapStatement($statement); }