From 905265ea0ebd0f0166de3f8ace63bcc995cb1cee Mon Sep 17 00:00:00 2001 From: Vladimir Kartaviy Date: Wed, 7 Jan 2015 16:49:46 +0200 Subject: [PATCH 1/2] "multi_field" type fields are not normalized Fix for #764 --- Index/MappingBuilder.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Index/MappingBuilder.php b/Index/MappingBuilder.php index 21ae871..9782e84 100644 --- a/Index/MappingBuilder.php +++ b/Index/MappingBuilder.php @@ -107,6 +107,9 @@ class MappingBuilder if (!isset($property['type'])) { $property['type'] = 'string'; } + if ($property['type'] == 'multi_field' && isset($property['fields'])) { + $this->fixProperties($property['fields']); + } if (isset($property['properties'])) { $this->fixProperties($property['properties']); } From 2ce2d7e61053a7b7efbce73113ec455d23409eca Mon Sep 17 00:00:00 2001 From: Tim Nagel Date: Fri, 9 Jan 2015 08:55:57 +1100 Subject: [PATCH 2/2] Add test for multi_field --- CHANGELOG-3.0.md | 4 ++++ Tests/Functional/app/Basic/config.yml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG-3.0.md b/CHANGELOG-3.0.md index 3b9b2ac..ecb5dad 100644 --- a/CHANGELOG-3.0.md +++ b/CHANGELOG-3.0.md @@ -12,6 +12,10 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle/compare/v3.0.0...v3.0.1 To generate a changelog summary since the last version, run `git log --no-merges --oneline v3.0.0...3.0.x` +* 3.0.7 (Unreleased) + + * Fixed multi_field properties not being normalised #769 + * 3.0.6 (2015-01-04) * Removed unused public image asset for the web development toolbar #742 diff --git a/Tests/Functional/app/Basic/config.yml b/Tests/Functional/app/Basic/config.yml index 3c3d369..ebd1ea0 100644 --- a/Tests/Functional/app/Basic/config.yml +++ b/Tests/Functional/app/Basic/config.yml @@ -71,6 +71,11 @@ fos_elastica: properties: date: { boost: 5 } content: ~ + multiple: + type: "multi_field" + properties: + name: ~ + position: ~ user: type: "object" approver: