Currently the table image_suggestions_search_index_delta is shaped to have a line per wiki_id, page_id, tag tuples.
For articles where multiple tags are updated we should ideally schedule a single update not multiple ones.
The way to achieve this is unclear, it could be done upstream by changing the schema of image_suggestions_search_index_delta to have for instance map<string, array<string>> where the key is the tag and the value is the array of tag values.
It could be an extra transformation step on the search side too but given that we would like to adapt this data-pipeline to use the unified weighted_tags stream (T372912) it might be preferable to do the grouping early on the image_suggestions pipeline side.
AC:
- image_suggestions tag updates are grouped per page not per page, tag