示例#1
0
 /**
  * Gets the source of a single document
  *
  * @param string $index
  * @param string $type
  * @param string $id
  * @return array|object
  * @throws \Elastification\Client\Exception\RequestException
  * @throws \Elastification\Client\Exception\ResponseException
  */
 protected function getDocument($index, $type, $id)
 {
     $getDocumentRequest = new GetDocumentRequest($index, $type, $this->serializer);
     $getDocumentRequest->setId($id);
     /** @var DocumentResponse $response */
     $response = $this->client->send($getDocumentRequest);
     return $response->getSource();
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function getRequest($name)
 {
     return $this->client->getRequest($name);
 }