How to craft a data transformation - use script?

Pretty simple requirement:

Find all documents where the field "vendorid" has no value and give it a
value of "6"

Would I do this with an update call and use script? I'm a little unclear
how. Or is there a more canonical way to do something like this?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c4bf0d53-4cf8-4a58-934d-10e062a477ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.