Problem/Motivation
File replacement in media should trigger reindex in entities referencing that media file.
Steps to reproduce
- When node of type X is created/updated with media entities referenced, everything works as expected.
- If I edit the media entity Y that is referenced in a node, the node doesn't get re-indexed because it doesn't know that something changed.
Proposed resolution
I'm not sure what's a proper resolution; but right now I'm proposing to add a hook after text extraction works to fix this in custom code.
For proper resolution I guess we could update the search_api_attachments key_value rows and add the entities that reference the extracted file (not only media but the entities that reference the media)
Remaining tasks
- Ensure issue makes sense
- Provide patch
- Test
- Commit
User interface changes
Nothing
API changes
New hooks to be added
Data model changes
None if we go only with the hooks.
New data will be added if we go with a proper solution as explained above.
Issue fork search_api_attachments-3205272
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
izus commentedthis makes sens
thanks for catching it
Comment #4
kporras07 commentedI just added a MR that introduces the new hook https://git.drupalcode.org/project/search_api_attachments/-/merge_reques... :)
Comment #7
izus commentedGG
this is now merged to 8 and 9 branches
Thanks a lot