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/Index/MappingBuilder.php b/Index/MappingBuilder.php index 996db5f..5756751 100644 --- a/Index/MappingBuilder.php +++ b/Index/MappingBuilder.php @@ -113,6 +113,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']); } diff --git a/Tests/Functional/app/Basic/config.yml b/Tests/Functional/app/Basic/config.yml index 690bf5e..2718b6c 100644 --- a/Tests/Functional/app/Basic/config.yml +++ b/Tests/Functional/app/Basic/config.yml @@ -74,6 +74,11 @@ fos_elastica: properties: date: { boost: 5 } content: ~ + multiple: + type: "multi_field" + properties: + name: ~ + position: ~ user: type: "object" approver: