[Improvement] Add logic for multiple field collection fields #320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes in this pull request
Resolves issue when having multiple allowed field collection items in the class definition field. The field collection items can contain fields with same name which will result in overriding of the mapping.
The fields should be nested based on the field collection item names (type).
e.g
Error: "Handling "Pimcore\Bundle\GenericDataIndexBundle\Message\IndexUpdateQueueMessage" failed: handleIndexQueueEntry failed! Error: Bulk operation produced errors: {"took":0,"errors":true,"items":[{"index":{"_index":"pimcore_data-object_filterdefinition-odd","_id":"563","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse field [standard_fields.filters.preSelect] of type [text] in document with id '563'. Preview of field's value: '{document=[], asset=[], object=[]}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:1110"}}}}]}" ["class" => "Pimcore\Bundle\GenericDataIndexBundle\Message\IndexUpdateQueueMessage","retryCount" => 3,"delay" => 4000,"error" => "Handling
preSelect get overriden by text field since its an input field in
FilterInputField
and in theFilterCategory
it is a relation