mapStatement() public method

Execute a map statement on index;.
public mapStatement ( array $mappings ) : array
$mappings array
return array
Beispiel #1
0
 /**
  * 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);
 }