aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-09-01 07:47:49 +0200
committerChristian Weiske <cweiske@cweiske.de>2016-09-01 07:47:49 +0200
commit7aba8a17bae437bfba2cb6c6496f750d014f3636 (patch)
tree8920bf550d19c6de6c808915703ec10363df8950 /src
parent8b9ae4fc9a3f8402001dd1a054658d5e1246efff (diff)
downloadphinde-7aba8a17bae437bfba2cb6c6496f750d014f3636.tar.gz
phinde-7aba8a17bae437bfba2cb6c6496f750d014f3636.zip
Always show text, make text extract size configurable.
Resolves: #8
Diffstat (limited to 'src')
-rw-r--r--src/phinde/Elasticsearch.php7
1 files changed, 7 insertions, 0 deletions
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,
),
)
),