From 1ce31bc9054486b54a0debed8146c18eb0decb40 Mon Sep 17 00:00:00 2001 From: Dennis Dam Date: Fri, 24 Feb 2017 18:12:53 +0100 Subject: [PATCH 1/2] add post excerpt to standard fields --- src/elasticsearch/Defaults.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elasticsearch/Defaults.php b/src/elasticsearch/Defaults.php index 2f51d0d..134322b 100644 --- a/src/elasticsearch/Defaults.php +++ b/src/elasticsearch/Defaults.php @@ -17,7 +17,7 @@ class Defaults **/ static function fields() { - return array('post_content', 'post_title', 'post_type'); + return array('post_content', 'post_title', 'post_type', 'post_excerpt'); } /** From 7297ed9117cd5703aa611859c7b0584758bbaf51 Mon Sep 17 00:00:00 2001 From: Dennis Dam Date: Sat, 25 Feb 2017 14:08:30 +0100 Subject: [PATCH 2/2] add post excerpt to standard fields --- tests/unit-tests/elasticsearch/ConfigTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/elasticsearch/ConfigTest.php b/tests/unit-tests/elasticsearch/ConfigTest.php index c1e076f..9141501 100644 --- a/tests/unit-tests/elasticsearch/ConfigTest.php +++ b/tests/unit-tests/elasticsearch/ConfigTest.php @@ -121,7 +121,7 @@ public function testRangesFieldFound() public function testFieldsDefault() { - $this->assertEquals(array('post_content', 'post_title', 'post_type', 'post_date'), Config::fields()); + $this->assertEquals(array('post_content', 'post_title', 'post_type', 'post_excerpt', 'post_date'), Config::fields()); } public function testFieldsDefined()