/**
* Returns the version number of this document as returned by ElasticSearch
*
* If this is a new document, this function returns 1
*
* @return int
*/
public function version()
{
if ($this->_result) {
return $this->_result->getVersion();
}
return 1;
}