I have a parent/child relationship between an user and many posts.
I know that elasticsearch is not a relational db and there are no joins but I would like to find the best way to achieve this goal.
When I search for a post I need to provide the user who published the post alongside the post source.
One possible solution would be to denormalize user data at index time but username could change quite often and I'm not sure about using updateByQuery for string modifications ( Can the username be used for script injection?)
The second solution I was looking for is the parent/child solution but I can not find any way to include the parent in each child but sending a get request for each parent id.