Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, the saved configuration of the "Aggregated Fields" processor looks something like this (example with one aggregated field defined):
settings:
fields:
search_api_aggregation_1:
label: 'Title &'
type: union
type_descriptions:
union: ''
concat: ''
sum: ''
count: ''
max: ''
min: ''
first: ''
fields:
'entity:comment/subject': 'entity:comment/subject'
'entity:node/title': 'entity:node/title'
'entity:taxonomy_term/name': 'entity:taxonomy_term/name'
'entity:user/name': 'entity:user/name'
'entity:comment/changed': 0
'entity:comment/field_name': 0
'entity:comment/cid': 0
'entity:comment/comment_type': 0
'entity:comment/comment_body:processed': 0
'entity:comment/comment_body': 0
'entity:comment/comment_body:format': 0
'entity:comment/created': 0
'entity:comment/mail': 0
'entity:comment/entity_id': 0
'entity:comment/entity_type': 0
'entity:comment/homepage': 0
'entity:comment/hostname': 0
'entity:comment/langcode': 0
'entity:comment/name': 0
'entity:comment/pid': 0
'entity:comment/status': 0
'entity:comment/thread': 0
'entity:comment/uid': 0
'entity:comment/uuid': 0
'entity:node/uid': 0
'entity:node/created': 0
'entity:node/body': 0
'entity:node/changed': 0
'entity:node/field_image': 0
'entity:node/langcode': 0
'entity:node/nid': 0
'entity:node/promote': 0
'entity:node/status': 0
'entity:node/vid': 0
'entity:node/revision_log': 0
'entity:node/revision_timestamp': 0
'entity:node/revision_uid': 0
'entity:node/sticky': 0
'entity:node/field_tags': 0
'entity:node/type': 0
'entity:node/uuid': 0
'entity:taxonomy_term/changed': 0
'entity:taxonomy_term/description': 0
'entity:taxonomy_term/langcode': 0
'entity:taxonomy_term/tid': 0
'entity:taxonomy_term/parent': 0
'entity:taxonomy_term/uuid': 0
'entity:taxonomy_term/vid': 0
'entity:taxonomy_term/weight': 0
'entity:user/changed': 0
'entity:user/created': 0
'entity:user/mail': 0
'entity:user/init': 0
'entity:user/langcode': 0
'entity:user/access': 0
'entity:user/login': 0
'entity:user/pass': 0
'entity:user/user_picture': 0
'entity:user/preferred_admin_langcode': 0
'entity:user/preferred_langcode': 0
'entity:user/roles': 0
'entity:user/signature': 0
'entity:user/signature_format': 0
'entity:user/timezone': 0
'entity:user/uid': 0
'entity:user/status': 0
'entity:user/uuid': 0
actions:
remove: 'Remove field'
actions:
add: 'Add new Field'
Clearly, that needs to be significantly improved:
- For each aggregated field, only the
label
,type
andfields
keys are really needed. - The
fields
key should just contain a (numerically indexed) sequence of the enabled fields, not the raw format used by thecheckboxes
form element. (That of course also means adapting the code that uses that configuration key, but that should be trivial enough.)
Estimated Value and Story Points
This issue was identified as a Beta Blocker for Drupal 8. We sat down and figured out the value proposition and amount of work (story points) for this issue.
Value and Story points are in the scale of fibonacci. Our minimum is 1, our maximum is 21. The higher, the more value or work a certain issue has.
Value : 1
Story Points: 3
Comment | File | Size | Author |
---|---|---|---|
#10 | 2413825-10--aggregated_fields_processor_config--interdiff.txt | 1.27 KB | drunken monkey |
#10 | 2413825-10--aggregated_fields_processor_config.patch | 3.36 KB | drunken monkey |
Comments
Comment #1
Nick_vhComment #2
Nick_vhMoving to Major after discussion at Drupalcamp Vienna
Comment #3
mollux CreditAttribution: mollux commentedComment #4
mollux CreditAttribution: mollux commentedComment #5
Nick_vhMollux, can you show us how the new saved configuration looks like?
Comment #6
mollux CreditAttribution: mollux commentedComment #7
borisson_Looks great!
Comment #8
mollux CreditAttribution: mollux commentedEspecially for Nick : added some documentation.
Comment #9
mollux CreditAttribution: mollux commentedComment #10
drunken monkeyThanks, looks very good!
However, I just spotted that the processor's config schema is also a bit off. Specifically, we add the
actions
key there, which we of course are not storing (I hope).Expanded patch attached, please test/review!
Comment #11
mashermike CreditAttribution: mashermike at Genuine commentedI can confirm that this patch cleans up the config export significantly.
Steps to reproduce:
Before patch (only pertinent part of export shown):
After export (note - had to edit and save index to get updated values):
Comment #13
drunken monkeyGreat to hear, thanks for testing!
Committed.
Thanks again, everyone!