aboutsummaryrefslogtreecommitdiff
path: root/src/phinde/Elasticsearch.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2020-02-29 21:16:44 +0100
committerChristian Weiske <cweiske@cweiske.de>2020-02-29 21:16:44 +0100
commit18d36cb052c42c20edda2814545c9bdf3fb1cbc5 (patch)
treed6ebd28dd7c575ba4e1c8b6eb4ad5a503e7884c6 /src/phinde/Elasticsearch.php
parente8e4778a7550636790d7b33d96a83bbbd3ac21ae (diff)
downloadphinde-elastic6.tar.gz
phinde-elastic6.zip
Diffstat (limited to 'src/phinde/Elasticsearch.php')
-rw-r--r--src/phinde/Elasticsearch.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/phinde/Elasticsearch.php b/src/phinde/Elasticsearch.php
index 5ca2180..8a6d8c7 100644
--- a/src/phinde/Elasticsearch.php
+++ b/src/phinde/Elasticsearch.php
@@ -167,6 +167,7 @@ class Elasticsearch
),
'highlight' => array(
'pre_tags' => array('<em class="hl">'),
+ 'post_tags' => array('</em>'),
'order' => 'score',
'encoder' => 'html',
'fields' => array(
@@ -231,8 +232,12 @@ class Elasticsearch
//unset($doc['_source']);
- //ini_set('xdebug.var_display_max_depth', 10);
- //echo json_encode($doc);die();
+ if (false) {
+ ini_set('xdebug.var_display_max_depth', 10);
+ header('Content-type: application/json');
+ echo json_encode($doc, JSON_PRETTY_PRINT);die();
+ }
+
$r->setBody(json_encode($doc));
$res = $r->send();
return json_decode($res->getBody());