public function createOrReplace($document, $options = null)
    {
        $this->assertProperties($document, ['_id', '_type'], 'createOrReplace');
        return $this->createDocument($document, 'createOrReplace', $options);
    }
public function createOrReplace($document, $options = null)
    {
        $this->assertProperties($document, ['_id', '_type'], 'createOrReplace');
        return $this->createDocument($document, 'createOrReplace', $options);
    }
public function createOrReplace ( $ document , $ options = null ) { $ this -> assertProperties ( $ document , [ '_id' , '_type' ] , 'createOrReplace' ) ; return $ this -> createDocument ( $ document , 'createOrReplace' , $ options ) ; }
Create or replace a document with the given ID

@param array $document Document to create. Must include `_id`  and `_type`
@param array $options Optional request options
@return array Returns the created document
Create or replace a document with the given ID