How to update already existing documents after adding a new attribute to document type

I have added a new attribute to one of my document type. But i have to manually go to that particular document of that document type and edit save it for the new attribute to show up on the node in console.
Is there any alternative for this to update/refresh all the documents in one go?
Preferably using a groovy script?

Yes. Groovy script is the way. :wink: