/**
* @return Type
*/
private function getType()
{
if (null === $this->type) {
$this->type = $this->getIndex()->getType($this->typeName);
$mapping = new Type\Mapping();
$mapping->setType($this->type);
$mapping->setTtl(['enabled' => true]);
$mapping->setProperties([self::ID_FIELD => ['type' => 'string', 'include_in_all' => true], self::VALUE_FIELD => ['type' => 'string', 'include_in_all' => true]]);
$mapping->send();
}
return $this->type;
}