[icinga-checkins] icinga.org: icingaweb2-module-elasticsearch/master: RestApiClient: Utilize class SearchHit in method fetchDocument()

git at icinga.org git at icinga.org
Mon May 9 08:34:33 CEST 2016


Module: icingaweb2-module-elasticsearch
Branch: master
Commit: 8712bc558cf304c04ebc3cb88da77eadf15c70b8
URL:    https://git.icinga.org/?p=icingaweb2-module-elasticsearch.git;a=commit;h=8712bc558cf304c04ebc3cb88da77eadf15c70b8

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Mon May  9 08:30:18 2016 +0200

RestApiClient: Utilize class SearchHit in method fetchDocument()

---

 library/Elasticsearch/RestApi/RestApiClient.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Elasticsearch/RestApi/RestApiClient.php b/library/Elasticsearch/RestApi/RestApiClient.php
index 2a4656f..58c2784 100644
--- a/library/Elasticsearch/RestApi/RestApiClient.php
+++ b/library/Elasticsearch/RestApi/RestApiClient.php
@@ -436,8 +436,8 @@ class RestApiClient implements Extensible, Reducible, Selectable, Updatable
             throw new QueryException($this->renderErrorMessage($response));
         }
 
-        $json = $response->json();
-        return $this->createRow($json, $fields ?: array());
+        $hit = new SearchHit($response->json());
+        return $hit->createRow($fields ?: array());
     }
 
     /**



More information about the icinga-checkins mailing list