aboutsummaryrefslogtreecommitdiff
path: root/src/phinde/Elasticsearch.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/phinde/Elasticsearch.php')
-rw-r--r--src/phinde/Elasticsearch.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/phinde/Elasticsearch.php b/src/phinde/Elasticsearch.php
index c437036..43ef4f9 100644
--- a/src/phinde/Elasticsearch.php
+++ b/src/phinde/Elasticsearch.php
@@ -35,8 +35,8 @@ class Elasticsearch
)
)
);
- $res = json_decode($r->send()->getBody());
- return $res->exists;
+ $status = $r->send()->getStatus();
+ return $status !== 404;
}
public function get($url)