Cake\ElasticSearch\Document::version PHP Method

version() public method

If this is a new document, this function returns 1
public version ( ) : integer
return integer
    public function version()
    {
        if ($this->_result) {
            return $this->_result->getVersion();
        }
        return 1;
    }