/**
* Returns the ElasticSearch type name from which this document came from.
*
* If this is a new document, this function returns null
*
* @return string|nulll
*/
public function type()
{
if ($this->_result) {
return $this->_result->getType();
}
return null;
}