updateDocument() 공개 메소드

Update document, using update script. Requires elasticsearch >= 0.19.0.
public updateDocument ( integer | string $id, array | Elastica\Script\AbstractScript | Document $data, string $index, string $type, array $options = [] ) : Response
$id integer | string document id
$data array | Elastica\Script\AbstractScript | Document 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
리턴 Response
예제 #1
0
파일: Elastica.php 프로젝트: phpfour/ah
 /**
  * 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);
 }