Update document, using update script. Requires elasticsearch >= 0.19.0.
public updateDocument ( integer | string $id, array | Elastica\Script\AbstractScript | |
||
$id | integer | string | document id |
$data | array | Elastica\Script\AbstractScript | |
raw data for request body |
$index | string | index to update |
$type | string | type of index to update |
$options | array | array of query params to use for query. For possible options check es api |
return |
/** * Update document, using update script. Requires elasticsearch >= 0.19.0. * * @param int $id document id * @param array|\Elastica\Document $data raw data for request body * @param string $index index to update * @param string $type type of index to update * @param array $options array of query params to use for query. For possible options check es api * @return \Elastica\Response * @link http://www.elasticsearch.org/guide/reference/api/update.html */ public function updateDocument($id, $data, $type, $index = 'activehire', array $options = []) { return $this->client->updateDocument($id, $data, $index, $type, $options); }