From 7aba8a17bae437bfba2cb6c6496f750d014f3636 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 1 Sep 2016 07:47:49 +0200 Subject: Always show text, make text extract size configurable. Resolves: #8 --- src/phinde/Elasticsearch.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/phinde/Elasticsearch.php') diff --git a/src/phinde/Elasticsearch.php b/src/phinde/Elasticsearch.php index 4035861..c437036 100644 --- a/src/phinde/Elasticsearch.php +++ b/src/phinde/Elasticsearch.php @@ -136,6 +136,11 @@ class Elasticsearch $sortCfg = array(); } + $contentMatchSize = 100; + if ($GLOBALS['phinde']['showFullContent']) { + $contentMatchSize = 999999; + } + $r = new Elasticsearch_Request( $this->baseUrl . 'document/_search', \HTTP_Request2::METHOD_GET @@ -168,6 +173,8 @@ class Elasticsearch 'text' => array( 'require_field_match' => false, 'number_of_fragments' => 1, + 'fragment_size' => $contentMatchSize, + 'no_match_size' => $contentMatchSize, ), ) ), -- cgit v1.2.3