I have two entities in my application: tasks and users. Each task is assigned to a user. I may have tens of thousands of tasks per application instance but only tens or hundreds of users per application instance.
I’d like to sort my tasks by the assigned user’s name.
However, the assigned user’s name may change over time. If I were to denormalize this data then whenever a user changes their name I’d need to update hundreds or thousands of tasks which I imagine could be inefficient.
The ElasticSearch join field type feels like a good fit here since I have many children but few parents. But I can’t find a way to reference a parent’s field from a child. (Or better yet index children based on a parent field’s value.)
Alternatively if ElasticSearch has an efficient bulk update API that: 1) doesn’t require me to load all a user’s tasks into application code, 2) can update all denormalized account names atomically in one refresh then I feel that would be a viable solution for my use case.
(This application may actually run on AWS OpenSearch.)