Say my doc looks something like this.
{ ... a: {...}, b: {...} }
and i need to partially update a and b asychronously and maintain the order of updates.
Since the exteranal version in elasticsearch is for the whole document i couldn't use it; since there may be requests to update just a or b field. So i decided add my own version to each of the fields.
like this:
{ ..., my_version: 0 a: {... , my_version: 0}, b: {..., my_version: 0} }
Now in my update_by_query i can say update doc where doc.a.my_version < my_database_udpatedAt.
I realize that this wont work like the inbuilt version in elasticsearch. But i believe that this can maintain the order of updates in my docs.
Would this work. Did i miss anything ?